php - how to get the image inserted from the tinymce editor? -
I'm trying to use the tinymce text editor, but not able to get the contents of the editor using jQuery And if I use the simple post method to get the original, then I get the text, but the image is missing?
I tried to use jQuery:
$ (document) .ready (function () {$ ("# save"). () {$ .post ("test_skin_dump.php", {data_info: $ ("# elm2") .HTML;}, function (data) {if (data) {$ ("# show_result") .html ;}});});}); & Lt; Textarea id = "elm2" name = "lm2" rows = "15" cols = "80" style = "width: 80%" & gt; & Lt; / Text field & gt; What am I doing wrong, can someone correct me, please?
TinyMCE has its own API that can take advantage of you. Actually, it's not really bad at all. In your case, you can get the complete editor as follows:
tinyMCE.activeEditor (). GetBody (); If you are sure the user has clicked on the image (i.e. selected), you can do so to get the image node:
< Code>. TinyMCE.activeEditor () selection.createHTML ();
Note that .selection is a property, which is why there is no set of parentheses in it.
If you do not do this in any way, or for some reason, it is not responding very well to your question, then check the link below:
< Ul>Let me know what else you have.
Comments
Post a Comment