• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 503
  • Last Modified:

ckeditor contents to jquery

It returns an empty value when I select the contents of an instance of ckeditor. like this:

var data = $("#AgreementText1").val();
alert (data);
var data = $("#AgreementText2").val();
alert (data);

One is a regular textarea and works fine and the other is a ckeditor instance and it shows nothing.
0
M256
Asked:
M256
  • 2
1 Solution
 
M256Author Commented:
Note: I also tried getting it from the form field name:

var data = $("input[name=AgreementText]").val();
0
 
M256Author Commented:
Found it.
		var editor_data = CKEDITOR.instances.AgreementText.getData();
		alert( editor_data );  

Open in new window


http://stackoverflow.com/questions/4826036/get-ckeditor-content-jquery
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now