显示 CKEditor 中的文本

发布于 2024-08-19 04:28:54 字数 344 浏览 3 评论 0原文

当我显示 CKEditor 文本时,也会显示 html 标签。怎么才能只显示文字呢? 我得到这个:

 

  • Nurzahan 路,达卡
  • 泰姬陵以西 路
  • 电话:9110614

我只想展示这个:

* Nurzahan Road,Dhaka
* West of Tajmahal Road
* Phone: 9110614

When I display CKEditor text the html tags are also displayed. How can I only show the text?
I'm getting this:

<p>  </p> <ul style="list-style-type:
none; list-style-image: none; list-style-position: outside;">
<li> Nurzahan Road,Dhaka</li> <li> West of Tajmahal
Road</li> <li> Phone: 9110614</li> </ul>

I want to show only this:

* Nurzahan Road,Dhaka
* West of Tajmahal Road
* Phone: 9110614

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

南风几经秋 2024-08-26 04:28:54

您可能在显示 HTML 代码的代码中的某个位置有 htmlentities()htmlspecialchars() 。如果您将引用的 HTML 放入 HTML 页面中,它应该会按需要显示。

You have probably a htmlentities() or htmlspecialchars() somewhere in the code that displays the HTML code. If you put in the HTML as you quoted it into a HTML page, it should turn up as desired.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文