dhtmlxEditor stylesheet for content being edited

Hi,



I have initialized a dhtmlxEditor by attaching it to a layout cell as follows:



var myEditor = workZoneLayout.cells(“b”).attachEditor();

myEditor.setIconsPath(“codebase/dhtmlx/imgs/”);

myEditor.init();



I am using dhtmlxEditor to manage and format text blocks of content to be displayed in a website. I would like the display of content being edited within dhtmlxEditor to match how will appear when displayed within the website. How do I set the dhtmlxEditor to use the same styles (or even stylesheet) that controls the appearance of the content once it is displayed?



Thanks,

Max


Hello,


you can try to use the following approach to apply external stylesheet to editor document:





editor.init();


window.setTimeout(function(){
var linkEl = document.createElement(“link”);
linkEl.rel=“stylesheet”;
linkEl.type=“text/css”;
linkEl.href="…/some.css";
var head = editor.edDoc.getElementsByTagName(‘head’)[0];
head.appendChild(linkEl);

},1)