Hi Harjo,
thank you again for your support!
I think I will get this working, but I'm struggeling on the first step: Installing the svy Module. I can't find any documentation about that.... This is the main problem for me...
Regards
Thomas
LXS wrote:You have to add svyJFXWebView and svyUtils (as well from Servoy GitHub) as modules to your solution.
LXS wrote:var webView = new scopes.svyJFXWebView.WebViewPanel(elements.webView); // elements.webView is your tab panel
webView.load(urlToYourTinyMCEInstallation);
DEBUG load executed
DEBUG State Changed: SUCCEEDED > READY (location: )
DEBUG webEngineReady: false
DEBUG DocumentProperty Changed: [object HTMLDocument] >
DEBUG State Changed: READY > SCHEDULED (location: /Volumes/iMacOSX/Applications/Servoy741_bc/application_server/tinymce/tinymce.min.js)
DEBUG webEngineReady: false
DEBUG State Changed: SCHEDULED > RUNNING (location: /Volumes/iMacOSX/Applications/Servoy741_bc/application_server/tinymce/tinymce.min.js)
DEBUG webEngineReady: false
ERROR Exception loading
DEBUG State Changed: RUNNING > FAILED (location: /Volumes/iMacOSX/Applications/Servoy741_bc/application_server/tinymce/tinymce.min.js)
DEBUG webEngineReady: true
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="js/tinymce/tinymce.min.js"></script>
<script type="text/javascript">
tinymce.init({
selector: "textarea",
theme: "modern",
plugins: [
"advlist autolink lists link image charmap preview hr anchor pagebreak",
"searchreplace wordcount visualblocks visualchars code fullscreen",
"insertdatetime media nonbreaking save table contextmenu directionality",
"emoticons paste textcolor fullpage"
],
toolbar1: "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent",
toolbar2: "forecolor backcolor emoticons | link image table",
menubar: "edit insert view format table tools",
image_advtab: true,
menubar: "edit insert view format table tools",
statusbar : false,
mode : "textareas",
valid_children : "+body[style]",
paste_retain_style_properties : "all",
paste_remove_styles_if_webkit : false,
setup: function (ed) {
ed.on('init', function(args) {
tinyMCE.execCommand('mceFullScreen', true, ed.id);
});
}
});
</script>
</head>
<body>
<form method="post" action="somepage">
<textarea name="content" style="width:100%"></textarea>
</form>
</body>
</html>
fvWebView.executeScriptAndWait("tinyMCE.activeEditor.getContent()");
vHtml = globals.escapeJavaScript(vHtml);
var vScript = "tinyMCE.activeEditor.setContent( '" + vHtml + "' );"
fvWebView.executeScriptLater(vScript);
function escapeJavaScript(vContent) {
vContent = utils.stringReplace(vContent, "\n", "");
vContent = Packages.org.apache.commons.lang.StringEscapeUtils.escapeJavaScript(vContent);
return vContent;
}
var _textEditor = new scopes.svyJFXWebView.WebViewPanel(elements.tmceEditor);
_textEditor.load("http://localhost:8080/tmce1.html");
LXS wrote:get the content:
- Code: Select all
fvWebView.executeScriptAndWait("tinyMCE.activeEditor.getContent()");
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);
Users browsing this forum: No registered users and 0 guests