advanced-nova-media-library icon indicating copy to clipboard operation
advanced-nova-media-library copied to clipboard

Integrate to WYSIWYG editor?

Open ngtranthanhtoan opened this issue 4 years ago • 2 comments

Hi there,

I see the package is great!

I'm wondering is there any way that I can integrate this package to a WYSIWYG editor?

For example, if I am using TinyMCE editor, How can I open the media pop up and insert the image to the editor.

ngtranthanhtoan avatar Sep 07 '20 05:09 ngtranthanhtoan

I don't think that's falls into the scope of this package. I'm sorry.

bkintanar avatar Sep 07 '20 05:09 bkintanar

For anyone thinking about looking into this further...

TinyMCE adds the string query ?editor=tinymce5 to the end of the iframe url so you could look for this and then override the "image select" button with the following methods...

parent.postMessage({ mceAction: 'insert', content: 'the-file-path' });
parent.postMessage({ mceAction: 'close' });

7ammer avatar Oct 06 '21 11:10 7ammer