How do you set the focus of a TinyMCE textarea element?

后端 未结 13 2010
慢半拍i
慢半拍i 2020-12-29 20:33

I\'m using TinyMCE for a textarea on a page but it doesn\'t play nice in the tabbing order of the other elements.

I can use the following code to capture when I tab

13条回答
  •  死守一世寂寞
    2020-12-29 20:51

    I know this is an old post, but just to add my input about having the editor open and focus not working. What I found that worked for me was this:

    tinyMCE.activeEditor.focus();
    

    I had to set this in a window.setTimeout event because of how I was using JS objects and such. Hope this helps.

提交回复
热议问题