Today in the project, the use of Kindeditor, the project's form is to use AJAX to submit data, and the previous version of the treatment of conflict, the Cup!
Before this use a relatively stupid method to solve the problem, when it is mainly not look at the API, today to deal with the problem again, looked at the API, found that the problem can be more simple to deal with, see the code
| The code is as follows |
Copy Code |
var _editer = Kindeditor.create ('. Kindeditor ', { Allowfilemanager:true, Allowupload:false, Width: ' 90% ', Afterblur:function () {///Use this method to synchronize data immediately after the rich Text edit box has been burnt Kindeditor.sync (". Kindeditor"); } }); In |
This is done using the Afterblur method, which is triggered when the edit box is out of focus and then synchronizes the data.
In fact, there is another way to deal with, that is afterchange, but the method is handled too frequently, so choose Afterblur.