@cpt
2015-05-04T06:23:40.000000Z
字数 1182
阅读 2462
翻译
标题:Getting and Saving Data in CKEditor
原文:http://docs.ckeditor.com/#!/guide/dev_savedata
1.CKEditor automatically updates the replaced 'textarea' when the form is submitted, so there is no need to change any server-side code handling form submission after enabling CKEditor on an exisiting form element.
译文:当表单被提交的时候,CKEditor会自动替换掉textarea元素,所以在一个已经存在的表单元素上使用CKEditor处理表单提交后没有必要再去改变任何的服务端代码。
2.CKEditor helps you create content but it is the role of your website or application to deal with the data created in this way.
译文:CKEditor帮助你创建内容但它在你的站点或应用中的真正作用是通过这种方式来解决数据创建的问题。
3.Please note that the replaced textarea element is updated automatically by CKEditor straight before submission.
If you need to access the textarea value programatically with JavaScript (e.g. in the onsubmit handler to validate the entered data), there is a chance that the textarea element would still store the original data.
In order to update the value of replaced textarea use the editor.updateElement() method.
译文:请注意被替代的textarea元素会在表单提交前被CKEditor自动更新。如果你想要通过使用JavaScript程序去接收textarea中的值(例如:提交事件处理程序验证输入数据),textarea元素在此时仍会存储原始数据。为了去更新被替代的textarea元素的值,请使用editor.updateElement()方法。