在 CKEditor 3 中设置一个值

发布于 2024-08-13 17:00:00 字数 253 浏览 2 评论 0原文

这可能是一个非常非常基本的问题,但我似乎在手册中找不到任何相关内容。我想要做的就是在转换为 CKEditor 实例的 textarea 中设置一个值。

我尝试使用 NetBeans 提取一些 javascript 函数,但找不到看起来像设置值的函数。所以我想,让我们看一下 API 描述,但除此之外什么都没有。所以最后我搜索了 CKSource 论坛,但奇怪的是我在那里找不到任何东西。

有人对如何解决这个非常基本的问题有一些建议吗? (问起来都有点尴尬……)

This probably is a very very basic question but i can't seem to find anything about it in the manual. All i want to do is set a value in textarea converted to a CKEditor instance.

I tried to pull out some javascript functions with NetBeans, but i couldn't find one that looked like setting a value. So I figured, lets take a look at the API description but nothing there eighter. So at last I've searched through the CKSource forums but strangly enough I couldn't find something there eighter.

Does anybody have some suggestions how to solve this very basic issue? (It's almost embarrassing to ask...)

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

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

发布评论

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

评论(2

野侃 2024-08-20 17:00:00

呃……确实很尴尬。您可以简单地将内容放在 标记之间。

在旧版本(FCKEditor)中,您已手动为编辑器设置了一个值,我想这就是我搜索 API 的原因;)

Argh.. it was embarrassing indeed. You are able to simply put the contents between the <textarea></textarea> tags.

In the older versions (FCKEditor) you have set a value manually to the editor, I guess that's why I went searching through to the API;)

爱*していゐ 2024-08-20 17:00:00

如果您从 php 代码调用它,您可以编写以下代码

$ckeditor->editor('editor1',$content_data);

语法

$ckeditor->editor('desiredfieldname', $desired_content_from_database_or_anything);

And if you are calling it from php code, you can write below code

$ckeditor->editor('editor1',$content_data);

syntax

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