Tinymce catch and set value

Asked

Viewed 1,795 times

3

How I pick up and Seto the value of tinymce plugin?

tinymce is a textarea plugin with various options is a text formatting box, when I say grab the value I mean what was formatted by the user for example a bold text with size 16 and etc

  • 1

    Could better describe the problem/answer so that other people can easily identify this content

  • 2

    I know you’ve already accepted an answer, but just so this is potentially useful to other people in the future: what is the "plugin value"? By the answer it seems that you mean the textual content being edited by the plugin, right?

  • @Luizvieira this plugin is a textarea with several options is a text formatting box, when I say pick the value I mean what was formatted by the user for example a bold text with size 16 and etc

  • 2

    @Silvioandorinha Yes, see how with this text of your comment the "problem" is much clearer. I suggest you edit your question and add that kind of information there. So the question becomes clearer, makes it easier for more people to post interesting answers and even helps you gain a reputation because it attracts interest to the question. :)

3 answers

2

tinyMCE.get('seuid').getContent();  /* get */

tinymce.get('seuid').setContent('');  /* set */ 
  • 5

    Hello. I know the answer has already been accepted, but you could perhaps improve it a little by indicating, for example, what the user should pass as "seuid". I know that the answer has already helped Silvio (and this is very good!), but if it is improved a little it can help other people in the future who do not know much about the subject. :)

0

Setar:

window.parent.tinymce.get('id_do_seu_textarea').getBody().innerHTML = '<%= row.data %>';

0


tinyMCE.get('mensagem').getContent();  /* Pegar valor tinyMCE */

tinymce.get('mensagem').setContent('');  /* Popular campos e limpar campos */ 
  • Dear friend, please add a better explanation to your answer only code is very simple, could specify?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.