Ckeditor 输出保存在 MySql 中并检索到首页

发布于 2024-12-22 09:10:43 字数 407 浏览 2 评论 0原文

我在网站上使用 ckeditor 来格式化内容并将编辑器的输出保存在 MySql 中。当我从 MySql 获取内容时遇到问题,然后它使用 bb code 作为字符串而不是字符串显示输出,例如

MySql 中保存的值是

[b]hello my name is [/b] [color:#FF0000]Rohit[/color]

它在页面上显示输出时,我fetch

[b]some text[/b] [color:#FF0000]some text[/color]

我希望输出 hello my name 为粗体,Rohit 为红色 : 你好,我叫罗希特,

可以吗?

I'm using the ckeditor on my site to format the content and saving the output of the editor in MySql. I have a problem when I fetch the content from the MySql then it is displaying the output with bb code as string not string for example

The value saved in MySql is

[b]hello my name is [/b] [color:#FF0000]Rohit[/color]

it is displaying the output on page is when I fetch

[b]some text[/b] [color:#FF0000]some text[/color]

I want the output hello my name in bold and Rohit in red color :
hello my name is Rohit

Is it possible?

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

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

发布评论

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

评论(1

一抹淡然 2024-12-29 09:10:43

只需从 ... 中删除行 extraPlugins : 'bbcode'

<script type="text/javascript">
            CKEDITOR.replace( 'best_moments',{ height: '40px',extraPlugins :'bbcode'

,它就会根据您的需要显示输出。希望这有帮助。

Just remove the line extraPlugins : 'bbcode' from your

<script type="text/javascript">
            CKEDITOR.replace( 'best_moments',{ height: '40px',extraPlugins :'bbcode'

...and it would display the output as you want. Hope this helps.

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