docCSSFile: // CSS file used to style the document contained within the editor\r
"", \r
bodyStyle: // style to assign to document body contained within the editor\r
- "margin:4px; font:10pt Arial,Verdana; cursor:text"\r
+ "margin:4px; color:#4c4c4c; font-size:13px; font-family:\"Lucida Grande\",Helvetica,Verdana,Arial,sans-serif; cursor:text"\r
},\r
\r
// Define all usable toolbar buttons - the init string property is \r
\r
// Bind the window resize event when the width or height is auto or %\r
if (/auto|%/.test("" + options.width + options.height))\r
- $(window).bind('resize.cleditor', function () { refresh(editor); });\r
-\r
+ $(window).bind('resize.cleditor', function () {\r
+ //Forcefully blurred iframe contentWindow, chrome, IE, safari doesn't trigger blur on window resize and due to which text disappears\r
+ var contentWindow = editor.$frame[0].contentWindow;\r
+ if(!$.browser.mozilla && contentWindow){\r
+ $(contentWindow).trigger('blur');\r
+ }\r
+ // CHM Note MonkeyPatch: if the DOM is not remove, refresh the cleditor\r
+ if(editor.$main.parent().parent().size()) {\r
+ refresh(editor);\r
+ }\r
+ });\r
// Create the iframe and resize the controls\r
refresh(editor);\r
\r
\r
// change - shortcut for .bind("change", handler) or .trigger("change")\r
fn.change = function change(handler) {\r
- console.log('change test');\r
var $this = $(this);\r
return handler ? $this.bind(CHANGE, handler) : $this.trigger(CHANGE);\r
};\r
//==================\r
// Private Functions\r
//==================\r
-
+\r
// checksum - returns a checksum using the Adler-32 method\r
function checksum(text)\r
{\r
\r
var $toolbar = editor.$toolbar,\r
$group = $toolbar.children("div:last"),\r
- wid = $main.width();\r
+ wid = /%/.test("" + options.width) ? options.width : $main.width();\r
\r
// Resize the toolbar\r
var hgt = $group.offset().top + $group.outerHeight() - $toolbar.offset().top + 1;\r