jquery - How do I add styles to windowManager popup in TinyMCE 4? -


note: please read comments.

i'm rendering jquery template tinymce plugin i'm writing , cant figure out how style windowmanager window.

it looks tinymce overriding styles, know there ways inject styles editor think question still valid.

here's plugin:

tinymce.pluginmanager.add('example', function (editor, url) {     var url = "vieweditactivity.aspx/getcourseoutlinefromactivity"     editor.addbutton('example', {         text: 'link content',         icon: false,         onclick: function () {             editor.windowmanager.open({                        title: 'create content link',                 width: 800,                 height: 500,                                    body: [                     {                         type: 'container',                         onpostrender: function (e, f) {                                               ondemandadmin.calljsonmethod(url, { "activityid": _activityid }, function (data) {                                 $("#coursetreefortinymcetmpl").tmpl(data.d).appendto("#" + e.control._eventsroot._id + "-body");                                 $("#" + e.control._eventsroot._id + "-body a[href*='" + activityid + "']").parent().css("background-color", "silver");                              });                         }                     }                 ],                 onsubmit: function (e) {                     editor.insertcontent('title: ' + e.data.title);                 }             });         }     }); }); 

here's initializer:

tinymce.init({     selector: "#htmlcontenteditor",     plugins: "code example",     toolbar: "example",     height: 400,     //popup_css: "css/tinymce-custombody.css", <-- doesn't work     setup: function (ed) {         ed.on("change", tinymce_onchange_callback);     }  }); 

to prove there markup being generated here's markup directly form windowmanager body source:

<h2>     <a href="vieweditactivity.aspx?id=cd20e736-eed7-4c49-b51b-1ef86c418687">online broker prelicense program ()</a> </h2> 

rendered output:

enter image description here

how add styles windowmanager popup in tinymce 4?


update:

based on @tvgemert's answer. able add tag siblings child, doesn't me in scope unfortunately.

enter image description here

the blue arrow points .mce-editor tag, parent container of windowmanager editor need style. tips on appreciated.

you try first add classname container, , style elements through stylesheet of skin's

body: [     {         type: 'container',         classes: 'myclassname',         onpostrender: function (e, f) {                               ondemandadmin.calljsonmethod(url, { "activityid": _activityid }, function (data) {                 $("#coursetreefortinymcetmpl").tmpl(data.d).appendto("#" + e.control._eventsroot._id + "-body");                 $("#" + e.control._eventsroot._id + "-body a[href*='" + activityid + "']").parent().css("background-color", "silver");              });         }     } ], 

the rendered classname in case mce-myclassname


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -