Support #790
closedWTextEdit::setExtraPlugins
0%
Description
Can someone help me about how to use the WTextEdit::setExtraPlugins.
I don't understand how to load the plugin before initial display of the widget.
i've tried:
WContainerWidget *teContainer = new WContainerWidget();
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);
but it doesn't work.
Thank's for your help.
Updated by Koen Deforche over 13 years ago
Hey,
It's the proper way, but it seems that not all plugins load properly and then JavaScript terminates on an error.
If I omit autolink and lists, then I do not get an error, but you still need to populate the toolbars with buttons for these plugins ?
Regards,
koen
Updated by Francesco Alfano over 13 years ago
Koen Deforche wrote:
Hey,
It's the proper way, but it seems that not all plugins load properly and then JavaScript terminates on an error.
If I omit autolink and lists, then I do not get an error, but you still need to populate the toolbars with buttons for these plugins ?Regards,
koen
Hello,
how i use this code: i've add the setToolBar method
\"
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");
teTextEditor->setToolBar(1, "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor");
teTextEditor->setToolBar(2, "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen");
teTextEditor->setToolBar(3, "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage");
\"
and it seems to work.
Thanks, for you help.
Updated by Koen Deforche over 13 years ago
- Status changed from Resolved to Closed