开发者

CKEditor output rules

开发者 https://www.devze.com 2023-03-19 22:48 出处:网络
Is there a way to add rules for the changes ckeditor makes to html? Like I would like to use <br /> instead of it being output as <p>$nbsp;</p>

Is there a way to add rules for the changes ckeditor makes to html?

Like I would like to use <br /> instead of it being output as <p>$nbsp;</p> , to not wrap <style></style> in <p> tags , and ha开发者_如何学JAVAve it not modify the white space and leave all the carriage returns as they are put in.

Most of all I'm looking for some way to allow php to be added. The CMS I am using it on needs php on some pages. I write all the code but the client has the ability to go in and edit the text, but she doesn't know html, hence ckeditor, and changes pages with php in it over to ckeditor sometimes and it completely garbles the code.

Is there any way to do any of this?


CKEditor offers a powerful and flexible output formatting system. It gives developers full control over what the HTML code produced by the editor will look like.

http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Output_Formatting

Most of all I'm looking for some way to allow php to be added

PHP can be added you just need to open the file in a plain textarea tag for writing and make sure its handled properly when saving, or if content is held in database, use eval() but not recommended. http://php.net/manual/en/function.eval.php

If your client dose not understand basic html then opening up the page to more syntax errors will only cause you greater head pain.

0

精彩评论

暂无评论...
验证码 换一张
取 消