tinymce.ui simple text component -


i'm using tinymce trying extend plugin show dialog specific layout:

 editor.windowmanager.open({         title: 'title of dialog',         body: [             {type: 'label', text: 'my label'},             { name:'my_input', type: 'textbox'},         //  {  type: 'text', html:'some content <b>bold</b> if posilbe!'},             //  {  type: 'html', value:'<div>with custom formating</div>'}         ]     } 

i checked documentation tinymce.ui several times can find way add html or text component in constructor of dialog (like comment rows in example).

i know there option using ready html template dialog.. there lot of events , triggers using constructor , .ui components more suitable case.

i used use jquery ui dialog ran issues after tinymce 4.0.

i have tinymce plugin lets people fetch plain text version of post in wordpress editor. show them text using this:

var plain_block = {     type: 'container',      html: '<textarea style="margin: 10px; width: 550px !important; height: 450px !important; background-color: #eee;" readonly="readonly">whatever plain text need show goes here</textarea>' };  ed.windowmanager.open({     title: "plain text of post",     spacing: 10,     padding: 10,     items: [      plain_block     ],      buttons: [      {            text: "close",             onclick: function() { ed.windowmanager.close();}          }     ] }); 

end result pretty plain-jane dialog box html , close button


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -