Hi,

I'm trying to add some validations when the user save press the save button
on xwiki creation page.
What I added in actionButtons.js is that :
  onSaveAndContinue : function(event) {
          if (typeof(Wysiwyg) == 'undefined') {
                return;
          }
          var editors = Wysiwyg.getInstances();
          for(var hookId in editors) {
                var editor = editors[hookId];
                var plainTextArea = editor.getPlainTextArea();
          }
         alert(plainTextArea.value);
         ....

My problem is that I get an outdate value, meaning that for example, if in
my page I have :
a
b
c
And if I write "d" at the end, the alert return only :
a
b
c

Is there another better solution to get the text in the WYSIWYG editor ?

Fred




--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Get-textarea-content-of-wysiwyg-in-javascript-tp7583073.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to