繁体   English   中英

ckeditor将html实体显示为纯文本

[英]ckeditor showing html entities as plain text

我已经将ckeditor与php一起使用,但是它以纯文本形式显示html实体,例如换行符和锚标记。 我看过其他链接,并在ckeditor的配置中进行了更改,但是它不起作用。

Hello,<br>Please join me <a href='https://.........'>link</a> 

我的配置:

CKEDITOR.editorConfig = function (config) {
    config.enterMode = CKEDITOR.ENTER_P; 
    config.language = 'es';
    config.uiColor = '#F7B42C';
    config.height = 300;
    config.toolbarCanCollapse = true;
    config.allowedContent = true;
    config.entities = true; 
    config.ignoreEmptyParagraph = false;

   };
  CKEDITOR.replace('email_content');

希望您直接显示值,如果不是,请使用@Html.Raw(value)

<textarea id="email_content" name="email_content">@Html.Raw(value)</textarea>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM