【问题标题】:How to render CKeditor's rich text from a CMS into a Next.js app?如何将 CKeditor 的富文本从 CMS 渲染到 Next.js 应用程序中?
【发布时间】:2022-02-06 17:36:00
【问题描述】:

我目前正在使用:

<div dangerouslySetInnerHTML={{ __html: article.content }}></div>

为了呈现我从 Strapi CMS 后端的 CKEditor 输入字段中获得的富文本。 有没有更好的方法来做到这一点不使用危险的SetInnerHTML?我研究过 ReactMarkdown,但这似乎只适用于 Strapi 的内置旧 Markdown 编辑器。

【问题讨论】:

    标签: html next.js ckeditor content-management-system dangerouslysetinnerhtml


    【解决方案1】:

    在我们的项目中,我们也使用dangerouslySetInnerHTML

    【讨论】:

      猜你喜欢
      • 2022-08-04
      • 2010-12-25
      • 2012-03-01
      • 2023-02-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-02
      • 1970-01-01
      相关资源
      最近更新 更多