Html Editor default font

This commit is contained in:
RainLoop Team 2014-08-12 16:32:08 +04:00
parent 2dd9b076fe
commit 6ad84283b7
7 changed files with 172 additions and 160 deletions

View file

@ -69,7 +69,7 @@ NewHtmlEditorWrapper.prototype.resetDirty = function ()
/**
* @return {string}
*/
NewHtmlEditorWrapper.prototype.getData = function ()
NewHtmlEditorWrapper.prototype.getData = function (bWrapIsHtml)
{
if (this.editor)
{
@ -78,7 +78,9 @@ NewHtmlEditorWrapper.prototype.getData = function ()
return this.editor.__plain.getRawData();
}
return this.editor.getData();
return bWrapIsHtml ?
'<div data-html-editor-font-wrapper="true" style="font-family: arial, sans-serif; font-size: 13px;">' +
this.editor.getData() + '</div>' : this.editor.getData();
}
return '';
@ -166,7 +168,7 @@ NewHtmlEditorWrapper.prototype.init = function ()
self.editor = window.CKEDITOR.appendTo(self.$element[0], oConfig);
self.editor.on('key', function(oEvent) {
if (oEvent && oEvent.data && 9 === oEvent.data.keyCode)
if (oEvent && oEvent.data && 9 /* Tab */ === oEvent.data.keyCode)
{
return false;
}
@ -177,6 +179,7 @@ NewHtmlEditorWrapper.prototype.init = function ()
});
self.editor.on('mode', function() {
self.blurTrigger();
if (self.fOnModeChange)