Forum: Ruby on Rails How to get TinyMCE editor value( text content)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E5d4db2f53bec777e0d25acbeb3f706e?d=identicon&s=25 Veera Sundaravel (veeraa2003)
on 2007-05-01 08:32
Hi everybody !


I included one tinymce editor in my rails application. But I cant get
the textarea content from the tiny editor. I dont know how to include
the submit button .

And also I wrote a javascript for getting the textarea content when the
user press the enter button. Its also not working. Why it is.


tinyMCE.init({
  mode : "textareas",
});

<textarea name="msg" id='msg' onKeyPress="submit_on_enter(event)">
TinyMCE.</textarea>

function submit_on_enter(e)

{

  var key;



  if(window.event)

    key = window.event.keyCode;

  else

    key = e.which



  if(key == 13){

    sendmsg();

    $('msg').value='';

  }



  return(false);

}

Above Javascript is for getting the textarea content when the user press
"Enter"----- But its not working . More interestingly, if I use ordinary
textarea( without tiny) the above script works fine.

Can anyone help how to i can get the tinymce editor text area value when
the user press enter. Please.


Thanks with regards,
Veeraa
6d6f112ec2a9047c1994c22590fcc737?d=identicon&s=25 Guest (Guest)
on 2007-05-01 09:11
You also wrote a javascript? nice for you! I wrote a C++ line once in my
life "write('Fuck Off')"

Yours very sincerely truly,

Joshua






Veera Sundaravel wrote:
> Hi everybody !
>
>
> I included one tinymce editor in my rails application. But I cant get
> the textarea content from the tiny editor. I dont know how to include
> the submit button .
>
> And also I wrote a javascript for getting the textarea content when the
> user press the enter button. Its also not working. Why it is.
>
>
> tinyM
E5d4db2f53bec777e0d25acbeb3f706e?d=identicon&s=25 Veera Sundaravel (veeraa2003)
on 2007-05-01 09:13
Guest wrote:
> You also wrote a javascript? nice for you! I wrote a C++ line once in my
> life "write('Fuck Off')"
>
> Yours very sincerely truly,
>
> Joshua
>
>
>
>
>
>
>

what do you mean................
3ed0da6fd74d2c8bb8121dc6426eef71?d=identicon&s=25 Venomx (Guest)
on 2007-05-08 17:01
Loosely translated, Joshua's mother should have spent less time
fellating the family dog, and more time investigating 'better late than
never' abortion techniques.

Rover might disagree though.


Veera Sundaravel wrote:
> Guest wrote:
>> You also wrote a javascript? nice for you! I wrote a C++ line once in my
>> life "write('Fuck Off')"
>>
>> Yours very sincerely truly,
>>
>> Joshua
>>
>>
>>
>>
>>
>>
>>
>
> what do you mean................
This topic is locked and can not be replied to.