提交 83a55714 编写于 作者: J Jinqn

[fixbug]by Jinqn 修改背景设置的bug

上级 bfc6185c
......@@ -43,10 +43,12 @@ UE.plugin.register('background', function () {
}
html += '}</style> ';
headHtml.push(html);
},
'beforesetcontent': function () {
me.execCommand('background', {});
}
},
inputRule: function (root) {
me.execCommand('background', {});
utils.each(root.getNodesByTagName('p'), function (p) {
var styles = p.getAttr('data-background');
if (styles) {
......@@ -84,7 +86,8 @@ UE.plugin.register('background', function () {
ele = me.document.getElementById(cssRuleId),
styles = (ele ? ele.innerHTML : '').match(/body[\s]*\{(.*)\}/);
return styles ? stringToObj(styles[1]) : null;
}
},
notNeedUndo: true
}
}
}
......
......@@ -236,6 +236,7 @@
dialog.onok = function () {
updateBackground();
editor.fireEvent('saveScene');
};
dialog.oncancel = function () {
editor.execCommand('background', backupStyle);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册