Jump to content
Sign in to follow this  
dauruk0512

Put cursor in tinymce if users click submit without typing in tinymce

Recommended Posts

Hello guys, need some help, quick question

 

here is demo

 

The schema :

 

i have form that should validate by this style cause some reason, all working fine just in tinymce i don't know how to set it in tinymce already googling but not found best solution, please some one review mine

 

Thanks

Share this post


Link to post
Share on other sites

There's a discussion here:

 

http://stackoverflow.com/questions/2212552/how-do-you-set-the-focus-of-a-tinymce-textarea-element

 

Those answers don't seem to agree on the capitalization of tinymce, I'm not sure which is the correct one to use or if they are both defined.

Share this post


Link to post
Share on other sites

try to prevent default submit :

 

use

 event.preventDefault();
    

before the tinyMCE.get('mytextarea').focus() .

 

works for me

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...