我们使用的是CKEditor 4.5.1 版,粘贴带有背景和内联样式的表格时出现问题。
以下是我们尝试复制和粘贴的代码:
<table border="0" cellpadding="50" cellspacing="0" style="border: 3px solid #545454;" width="100%">
<tbody>
<tr>
<td style="background:#000">
<table border="0" cellpadding="25" cellspacing="0" style="background: #fff; border: 2px solid #FF9900;" width="100%">
<tbody>
<tr>
<td>Test Table</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
这在以下情况下工作正常:
- 仅从 chrome 复制和粘贴到 chrome 同一页面。
- chrome to FF - 仅在右键单击并粘贴时有效
- chrome 到 IE,但它添加了一些内联样式,如边框图像:无;
- Firefox 到 FF,FF 到 IE。
- IE 到 IE。
它在以下情况下不起作用:
- 从chrome复制粘贴到chrome的另一页,chrome到ff,chrome到ie
- FF转镀铬
- IE 到 chrome,IE 到 FF。
IE = Internet Explorer,FF = 火狐
这也可以在下载的示例页面(ckeditor\samples\index.html)中重现。
我的build-config.js 的链接。
以下是 CKEditor 配置设置:
CKEDITOR.disableAutoInline = true;
CKEDITOR.config.height = 100;
CKEDITOR.config.width = '15%';
CKEDITOR.config.autoParagraph = false;
CKEDITOR.config.enterMode = CKEDITOR.ENTER_BR;
CKEDITOR.config.shiftEnterMode = CKEDITOR.ENTER_P;
CKEDITOR.config.allowedContent = true;
CKEDITOR.config.protectedSource.push(/<(script)[^>]*>.*<\/script>/ig);
CKEDITOR.config.extraAllowedContent = 'script(*)[*]{*};';
CKEDITOR.config.title = false;
请让我知道如何处理这个问题。