I am working towards a PR for rich text copy/cut/paste and need some help with this last hurdle
I am having problems invoking getHtmlFromSelection (and insertHtmlAtCursor) from within a RichTextCodeMirror event handler
In:
function RichTextCodeMirror(codeMirror, entityManager, options) {
I tried:
codeMirror.getWrapperElement().addEventListener('copy', function(e) {
var html1=getHtmlFromSelection();
var html2=self.getHtmlFromSelection();
var html3=firepad.getHtmlFromSelection();
});
However all these calls to getHtmlFromSelection return 'is not a function'
What's the proper way to do this ?