Hi Alex,
your code examples are confusing me a bit.
I'm loading the TinyMCE by the onLoad function of the form where the tabless panel element is set.
function onLoad():
- Code: Select all
var _textEditor = new scopes.svyJFXWebView.WebViewPanel(elements.tmceEditor);
_textEditor.load("http://localhost:8080/tmce1.html");
To get the content of the TinyMCE I have to add:
LXS wrote:get the content:
- Code: Select all
fvWebView.executeScriptAndWait("tinyMCE.activeEditor.getContent()");
as codeline in the onLoad function?
If yes, this is not working with a form variable like your 'fvWebView'.
And in the tinymce documentation I cannot find the 'tinyMCE.activeEditor.getContent()'. There is only the 'tinymce.selection.activeEditor.getContent()' and '...setContent()'.
As I understand, you will get and set the content to the form variable, or?
LXS wrote:set the content - here it is important to remove the line breaks and escape the html:
- Code: Select all
vHtml = globals.escapeJavaScript(vHtml);
var vScript = "tinyMCE.activeEditor.setContent( '" + vHtml + "' );"
fvWebView.executeScriptLater(vScript);
But how is the getting of the tinymce content be executed?
Where are your codelines above are? Also in the 'onLoad' function?
It would be very kind of you to make this more clear.
Thomas