html editor optimizations (fixed #79)

This commit is contained in:
RainLoop Team 2014-02-12 20:01:53 +04:00
parent 8da34e8d5f
commit e9b56e9477
104 changed files with 3874 additions and 3876 deletions

View file

@ -43,7 +43,6 @@ NewHtmlEditorWrapper.prototype.focusTrigger = function ()
*/
NewHtmlEditorWrapper.prototype.isHtml = function ()
{
window.console.log(this.editor.mode);
return this.editor ? 'wysiwyg' === this.editor.mode : false;
};
@ -121,7 +120,14 @@ NewHtmlEditorWrapper.prototype.setPlain = function (sPlain, bFocus)
if (this.editor)
{
this.modeToggle(false);
this.editor.setData(sPlain);
if ('plain' === this.editor.mode && this.editor.plugins.plain && this.editor.__plain)
{
return this.editor.__plain.setRawData(sPlain);
}
else
{
this.editor.setData(sPlain);
}
if (bFocus)
{