To resolve a method that textarea cannot get Kindeditor editor values

Source: Internet
Author: User

First of all, describe my side of the Kindeditor error phenomenon:
1, under the IE8/FF are not the value;
2, when you click the Kindeditor button to switch to Full-screen mode input, and then return to normal mode, you can get the value;
3, I use jquery Click event Submission Form, submit, can not get the value;
4, directly with the form of the submission button can get the value.

To start using the method:

Kindeditor.create (' textarea[id= ' fieldContent1 "] ', {
Items: [' source ', ' | ', ' fullscreen ', ' undo ', ' Redo ', ' cut ', ' copy ', ' Paste ', ' | ', '
' FontName ', ' fontsize ', ' ForeColor ', ' hilitecolor ', ' bold ', ' italic ', ' underline ',
' Removeformat ', ' justifyleft ', ' justifycenter ', ' justifyright ', ' insertorderedlist ',
' Insertunorderedlist ', ' | ', ' emoticons ', ' image ', ' link ', ' | ', ' about '
});

When the result submits the form textarea did not get the value of the Kindeditor text editor

The solution is as follows:

Kindeditor.create (' textarea[id= ' fieldContent1 "] ', {
Items: [' source ', ' | ', ' fullscreen ', ' undo ', ' Redo ', ' cut ', ' copy ', ' Paste ', ' | ', '
' FontName ', ' fontsize ', ' ForeColor ', ' hilitecolor ', ' bold ', ' italic ', ' underline ',
' Removeformat ', ' justifyleft ', ' justifycenter ', ' justifyright ', ' insertorderedlist ',
' Insertunorderedlist ', ' | ', ' emoticons ', ' image ', ' link ', ' | ', ' about ',
SyncType: "Form",
Aftercreate:function () {
var self = this;
Self.sync ();
},
Afterchange:function () {
var self = this;
Self.sync ();
},
Afterblur:function () {
var self = this;
Self.sync ();
}
});

Official explanation:
Sync ()
Sets the contents of the editor to the original textarea control.
Parameters: None
return: Keditor

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.