javascript - 删除 CKEditor 4 中的注释

标签 javascript ckeditor

我在代码中写入,当我切换到可视化编辑器时,然后将“”更改为“?-->”。我该如何删除它?我想在 CKEditor 中使用 PHP 和其他语言。

抱歉我的英语不好。我来自乌克兰。 ;]

示例: enter image description here

切换到可视化编辑器并返回。 enter image description here

最佳答案

尝试这个配置:

config.protectedSource.push( /<\?[\s\S]*?\?>/g );   // PHP code

取自 here 。那么 CKEditor 应该忽略你的 PHP 代码。

关于javascript - 删除 CKEditor 4 中的注释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15932355/

相关文章:

javascript - Android webkit 浏览器中的 XPCOM 支持?

javascript - Angular 算法 : stop ngFileUpload double looping?

javascript - CKEDITOR 将 <b> 替换为 <strong> 和其他标签

javascript - Angular 为 6 的 map 元素

c# - ajax 请求在 linkbutton asp 回发之前不会首先运行

javascript - 添加/更新 CSV 文件特定行中的数据

jquery - CKEditor 中的自动完成列表

javascript - 在 rails 中为 CKEditor 添加自定义工具栏

javascript - Cckeditor 从数据库加载模板

jquery - 通过 jquery 将图像附加到 ckeditor