Hello,
I would like to customize multiselection copy/cut/paste behavior of CM6. Copy and cut behaviors seems to fit what I need as it writes each selections separated by OEL into the clipboard.
Regarding paste, I would like to compare number of carets/selections to number of ‘lines’ in clipboard then if it matches, copy each line to appropriate caret/selection.
I planned to use an EditorView.domEventHandlers extensions, but as handers are not linked to editable content element, I cannot use ‘paste’ handler. Other solution would be to use a custom command on Ctrl+V, it works but as expected, it doesn’t change paste behavior from “system” event (e.g. context menu).
I think, linking custom handler to “paste” event of the editable content element, should work.
Any idea how I could achieve this ?
Thanks