[英]CKEditor: Editing templates (e.g. PHP, JSP, ASP, … i.e. non-standard HTML)
Hi all once again ! 再次大家好! I'm developing this plugin to edit PHP pages using CKEditor (please watch demo videos for further details ;o) .
我正在开发此插件以使用CKEditor 编辑PHP页面 (请观看演示视频以获取更多详细信息; o) 。 Everything works fine if I try to insert PHP code inside
<pre>
tag so as to render the code inside that page. 如果我尝试在
<pre>
标记内插入PHP代码,以便在该页面内呈现代码,则一切正常。
The fact is that I need to insert PHP code directly inside the code of target web page (well it's a PHP page indeed ...) because the idea is to insert PHP snippets that will be evaluated and expanded later in server-side. 事实是,我需要将PHP代码直接插入目标网页的代码中(实际上,这确实是一个PHP页面...),因为这样的想法是插入PHP代码段,这些代码段稍后将在服务器端进行评估和扩展。
In this demo video you can see that once I insert PHP code directly inside <div>
tag (ie in source mode) and switch back to source mode again then the whole PHP block is sanitized thus replaced by
在此演示视频中,您可以看到,一旦我将PHP代码直接插入
<div>
标记内(即在源模式下)并再次切换回源模式,则整个PHP块都将被清理,因此由
替换
entity. 实体。 The same happens if the plugin tries to insert the same snippet (ie in WYSIWYG mode) once Ok button is pressed.
如果插件在按下“ 确定”按钮后尝试插入相同的代码段(即在“ 所见即所得”模式下),则会发生相同的情况。
So questions are : 所以问题是:
Thanks in advance ! 提前致谢 !
使用config.protectedSource设置,该页面甚至列出了如何在PHP中使用它
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.