How can I open the TinyMce advimage plugin from outside the editor?

I want to run the advimage plugin outside of the TinyMCE editor (i.e. just the browse button on my page).

Is it possible? If so, how?

thank

+3
source share
1 answer

Ah, sorry to accept a commercial image manager,

you can use

<a href="javascript:;" onmousedown="tinyMCE.get('IDOFYOURTEXTAREA').execCommand('mceAdvImage');">[Image]</a>

or

<a href="javascript:;" onmousedown="tinyMCE.execCommand('mceAdvImage');">[Image]</a>

This requires tinymce to load somewhere. This is not a complete answer, but at least I wanted to replace another with the correct answer.

0
source

Source: https://habr.com/ru/post/1783900/


All Articles