提交 f135262d 编写于 作者: C campaign

by zhanyi

上级 fe33fbee
......@@ -773,7 +773,7 @@
* @name execCommand
* @grammar editor.execCommand(cmdName) => {*}
*/
execCommand:function ( cmdName ,ingoreContentChange) {
execCommand:function ( cmdName ) {
cmdName = cmdName.toLowerCase();
var me = this,
result,
......@@ -786,7 +786,7 @@
if ( me.queryCommandState( cmdName ) != -1 ) {
me.fireEvent( 'beforeexeccommand', cmdName );
result = this._callCmdFn( 'execCommand', arguments );
!ingoreContentChange && me.fireEvent('contentchange');
!me._ignoreContentChange && me.fireEvent('contentchange');
me.fireEvent( 'afterexeccommand', cmdName );
}
me.__hasEnterExecCommand = false;
......@@ -794,7 +794,7 @@
result = this._callCmdFn( 'execCommand', arguments );
!ingoreContentChange && me.fireEvent('contentchange')
}
!me.__hasEnterExecCommand && me._selectionChange();
!me._ignoreContentChange && me._selectionChange();
return result;
},
/**
......
......@@ -549,7 +549,9 @@ UE.plugins['table'] = function () {
}
if (state != -1 && (firstState === undefined || firstState == state)) {
var isEmpty = domUtils.isEmptyNode(td);
result = oldExecCommand.call(me,cmd,true);
me._ignoreContentChange = true;
result = oldExecCommand.apply(me,arguments);
me._ignoreContentChange = false;
var reg = new RegExp('[ \t\r\n' + domUtils.fillChar + ']', 'g');
if (isEmpty != domUtils.isEmptyNode(td) && !td[browser.ie ? 'innerText' : 'textContent'].replace(reg, '').length) {
domUtils.fillNode(me.document, td)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册