views:

58

answers:

0

has anyone tried to get an instance of tinyMCE editor in a bookmarket?

i tried the following:-

created a widget.js file which get attached to the body when the bookmarklet is clicked.

in the widget file i use the document.createElement to create a textarea, which i want as a text editor.

tinyMCE.activeEditor.setContent(selectedText);
  • selected Text is the content which the user has selected, this needs to be shown in the bookmarklet teaxtarea

I am getting the error tinyMCE.activeEditor is null

can someone pls help me with this?