2015-07-31, 08:39 PM
(This post was last modified: 2015-08-01, 08:34 AM by Ad Bakker.
Edit Reason: solution found
)
I found out that I can add text to the sceditor's texterea with the jQuery method:
where textvariable is the variable containing the text which is appended to the editor's textarea.
I tested it and it works. I wonder, however, whether there is also a method with which I can clear the text area contents.
EDIT
This is a solving record, I think. I just found out that the method to use is:
I leave it here , just in case someone else is looking for it.
This gives me the chance to broaden my question, however.
The above works for sceditor only. How could I achieve the same for all editors?
EDIT 2
The normal JQuery solution would be:
and I also found:
I tried this, together with normal javascript methods (although I do not know whether these can be mixed with jQuery), but none of these worked!!
$('#message').sceditor('instance').insert(textvariable);
where textvariable is the variable containing the text which is appended to the editor's textarea.
I tested it and it works. I wonder, however, whether there is also a method with which I can clear the text area contents.
EDIT
This is a solving record, I think. I just found out that the method to use is:
$('#message').sceditor('instance').val("");
I leave it here , just in case someone else is looking for it.
This gives me the chance to broaden my question, however.
The above works for sceditor only. How could I achieve the same for all editors?
EDIT 2
The normal JQuery solution would be:
$('#message').val(textvariable);
and I also found:
$('textarea#message').val(textvariable);
I tried this, together with normal javascript methods (although I do not know whether these can be mixed with jQuery), but none of these worked!!
Regards, Ad Bakker (NL)