简而言之:
我正在使用 Yii 框架
i'm using Yii Framework
我的页面上有一个 Ckeditor 窗口(php/yii 框架 - 工作正常)
i have a one Ckeditor window on my page ( php/ yii framework - works fine)
当我点击一个按钮时,一个新的 CKeditor 窗口正在生成并通过 AJAX 调用显示
when i hit a button, a new CKeditor window is being generated and shown through AJAX call
问题:这个新的 CKEditor 窗口正确显示了存储在数据库中的文本但是:当我点击保存"(与表单的其余部分一起生成的 ajax 按钮)时,这个新的 CKEditor 窗口中的值将不保存:CKeditor 发回它从数据库中获得的旧值.
THE PROBLEM: this new CKEditor window correctly displays the text stored in the database BUT : when i hit "Save" (an ajax button generated together with the rest of the form) the values from this new CKeditor window will not save : CKeditor sends back the old values that it got from the database.
当我移除 Ckeditor 并保留普通的 时:一切正常,所以我知道控制器很好.
When i remove the Ckeditor and leave the plain <textarea>
: everything is ok so i know that the controller is fine.
请问,有人经历过这样的事情吗?
Please, anybody went through something like this?
听起来像是典型的 AJAX 后 JS 绑定问题.:) 解决方法有几种可能,具体取决于发生了什么问题.
Sounds like a typical post-AJAX JS binding issue. :) There are a few possibilities for how to fix it, depending on what is going wrong.
Yii 论坛上的这篇帖子对你来说应该是钱,这是我得到大部分建议的地方:http://www.yiiframework.com/forum/index.php?/topic/9341-ckeditor-widget-in-a-cactiveform/
This post in the Yii forum should be money for you, it's where I got most of these suggestions: http://www.yiiframework.com/forum/index.php?/topic/9341-ckeditor-widget-in-a-cactiveform/
'textarea' ('onclick'=>'CKEDITOR.instances.TEXTAREA_ID.updateElement()',
莉>'textarea' ('onclick'=>'CKEDITOR.instances.TEXTAREA_ID.updateElement()',
祝你好运!
这篇关于用 AJAX 加载的 CKEditor + Yii:$_POST 不包含更新的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!