如何使CKEditor5丰富的文本内容在前端显示?

发布于 2025-02-02 14:22:22 字数 474 浏览 4 评论 0原文

我有一个使用Strapi CMS的VUE网站。我为Wysiwyg编辑器添加了CKEditor5的富文字,并且在后端上工作正常。但是,当我在前端上查看文本时,它显示了我编写/编辑的内容,而不是应该的html。

我已经看了文档,只是完全卡住了。以下是它显示的内容,也是我在代码中如何调用它。显然,我没有做什么,我只是不知道什么。任何帮助都将受到赞赏。

代码

<div>
{{Resource.attributes.body}}
</div>

”在此处输入图像说明”

I have a Vue website using the Strapi CMS. I added the CKEditor5 for my WYSIWYG editor for rich text, and it works fine on the backend. However, when I view the text on the frontend, it shows the markdown of what I wrote/edited rather than the HTML that it should.

I've looked at the documentation, and just am completely stuck. Below is what it displays as and how I'm calling it in in the code. Obviously there's something I'm not doing, I just have no clue what. Any help is appreciated.

CODE

<div>
{{Resource.attributes.body}}
</div>

enter image description here

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

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

发布评论

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

评论(1

擦肩而过的背影 2025-02-09 14:22:22

这很明显...
通过利用v-html属性修复了它。

It was something obvious...
Fixed it by utilization the v-html attribute.

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