Project

General

Profile

Actions

Bug #795

closed

Connect a button to Tinymce push button

Added by Francesco Alfano almost 13 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Target version:
Start date:
04/19/2011
Due date:
% Done:

0%

Estimated time:

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.

Actions #1

Updated by Francesco Alfano almost 13 years ago

I'm sorry it is support request, not a bug !!!

Actions #2

Updated by Koen Deforche almost 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

Actions #3

Updated by Francesco Alfano almost 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");

\"

Actions #4

Updated by Koen Deforche almost 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

Actions #5

Updated by Francesco Alfano almost 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.

Actions #6

Updated by Koen Deforche about 9 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'); } );");
}));
Actions #7

Updated by Koen Deforche about 9 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF