Forum: Ruby on Rails problem in using tinymce editor

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Veera S. (Guest)
on 2007-04-30 19:15
Hello everybody,

I have a problem in using tinymce editor. I successfully I loaded the
tinymce as follows ;

<%= javascript_include_tag :defaults %>

<script language="javascript" type="text/javascript"

<script language="javascript" type="text/javascript">
  mode : "textareas",

function submit_on_enter(e)


  var key;


    key = window.event.keyCode;


    key = e.which

  if(key == 13){






// And textarea like

<form method="post" action="/chat/post/<%= %>"
onSubmit="sendmsg(); return false;" id="msgform" name="msgform">

<textarea name="msg" id='msg' style="width: 400; height: 200;"


Here the problem I faced as follows :

1. I can simply type the text. But I dont know how to get the textarea
value. Because here I want to save the content of the textarea into
mysql table when the press the enter key. But I didn't work.

2. I used a function " onKeyPress="submit_on_enter(event)" for the above
work. But Its didn't work.

Can any one clarify my doubts. Please.

Thanks in advance,

This topic is locked and can not be replied to.