Bug #795
closedConnect a button to Tinymce push button
0%
Description
Hello,
How to connect a button from tinymce editor (like save, or newdocument as shown in http://tinymce.moxiecode.com/tryit/full.php) to a "Wt connect" to handle the push button event ?
How to pass parameter to tinyMCE.init like
tinyMCE.init({'force_p_newlines' : false, 'forced_root_block' : 'div' }) ?
Thanks in advance for your help, Francesco.
Updated by Francesco Alfano over 13 years ago
I'm sorry it is support request, not a bug !!!
Updated by Koen Deforche over 13 years ago
- Status changed from New to Feedback
Hey Fransesco,
Could you try the following method:
http://redmine.webtoolkit.eu/boards/1/topics/1071
Regards,
koen
Updated by Francesco Alfano over 13 years ago
Koen Deforche wrote:
Hey Fransesco,
Could you try the following method:
http://redmine.webtoolkit.eu/boards/1/topics/1071
Regards,
koen
Thanks for your response,
I can't use the method that you have proposed because the save button is already present in toolbar !
i've used the following code which automatically add a save button in toolbar
\"
teTextEditor = new Wt::WTextEdit(teContainer);
teTextEditor->setExtraPlugins("autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template");
teTextEditor->resize(700, 400);
teTextEditor->setToolBar(0, "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect");
\"
Updated by Koen Deforche over 13 years ago
Hey Fransesco,
I see. So you actually want to react to an event of an existing standard button? Have you found whether this is possible in the documentation of TinyMCE? If so, I can help you with how to integrate it in your Wt application.
Regards,
koen
Updated by Francesco Alfano over 13 years ago
Koen Deforche wrote:
Hey Fransesco,
I see. So you actually want to react to an event of an existing standard button?
Yes !
Have you found whether this is possible in the documentation of TinyMCE? If so, I can help you with how to integrate it in your Wt application.
Regards,
koen
Hello,
I have already contacted, you can see my post at:
http://tinymce.moxiecode.com/forum/viewtopic.php?id=25669
Thanks, for your time.
Updated by Koen Deforche almost 10 years ago
- Status changed from Feedback to Resolved
- Assignee set to Koen Deforche
- Target version set to 3.3.4
We added a rendered() accessor that allows you to do this:
edit->rendered().connect(std::bind([=] () {
edit->doJavaScript(edit->jsRef() + ".ed.onSaveContent.add("
"function() { "
"""alert('Dovrei salvare i dati su server'); } );");
}));
Updated by Koen Deforche almost 10 years ago
- Status changed from Resolved to Closed