0

I am referring to the Javascript Editor control (jqte) located at http://www.jqueryte.com/. Implementation is simple, but getting the modified text differs between Chrome and Internet Explorer.

This fiddle shows the problem: http://jsfiddle.net/jamescooke/1y29na1p/1/

Script:

$(document).ready(function () {

  $('.jqte-test').jqte();
  $('.jqte-test').jqte({"status" : true});
});

$('#button2').click(function() {
      var editor = $('.jqte-test');
      var newText=editor.text();
      $('#txt').text(newText);

});

Please run it in IE, and you will see the expected modified text.

Then run it in Chrome - and the "modified" text is reported as the original text.

Can anybody make a suggestion?

James Cooke
  • 1,086
  • 8
  • 7

1 Answers1

0

Ok I found an answer to this. Before retrieving the edited value, I basically had to disable the query first.

$('#button2').click(function() {
      var editor = $('.jqte-test');
       $('.jqte-test').jqte({"status" : false}); //ADDED THIS LINE
      var newText=editor.text();
      $('#txt').text(newText);
});
James Cooke
  • 1,086
  • 8
  • 7