function editOnCopy(editor: DraftEditor, e: SyntheticClipboardEvent<>): void {
  const editorState = editor._latestEditorState;
  const selection = editorState.getSelection();

  // No selection, so there's nothing to copy.
  if (selection.isCollapsed()) {
    e.preventDefault();
    return;
  }

  editor.setClipboard(getFragmentFromSelection(editor._latestEditorState));
}
If we have a selection, create a ContentState fragment and store
it in our internal clipboard. Subsequent paste events will use this
fragment if no external clipboard data is supplied.