View Full Version : Custom css content htmleditor

29 Nov 2011, 9:22 AM
How do I set the contents of my html editor to stay with the rules that are in my css? If for example by setting b {color: red} in my html editor, apply whenever the source content in bold blush, I tried the documentation but without success. Thank you.

29 Nov 2011, 11:10 AM
The actual editor that you see has two things. The HTML that you see like a web page is actually an iframe. The source is kept in a textarea. So where are you setting the color?

29 Nov 2011, 12:29 PM
getDocMarkup: function() {
var me = this,
h = me.iframeEl.getHeight() - me.iframePad * 2;
return Ext.String.format('<html><head><link rel="stylesheet" type="text/css" href="resources/css/app.css"/><style type="text/css">body{border:0;margin:0;padding:{0}px;height:{1}px;box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box;cursor:text}</style></head><body></body></html>', me.iframePad, h);