RichText editor [tinyMCE]: add options at tinymce.init

0
​​​​​Hi All, I'm struggling to get the richtext editor link popup to set the target window to _blank by default. According to the docs from TinyMCE it should be possible to add an option at tinymce.init.   tinymce.init({ selector: 'textarea', // change this value according to your HTML plugins: 'link', toolbar: 'link', link_default_target: '_blank' }); I do want to set the link_default_target to '_blank' to open the link in a new window. By default the Open link in... is set to Current window.  Any ideas how and where to set this option in mendix (or some Javascript) to change the default behaviour.   Thanks, Willem Jan      
asked
1 answers
0

It's not that easy I think. Some options:

- (bad) edit the javascript inside the widget (which will be overriden by any widget update in the future)

- (better) post a feature request to support this in the widget configuration

- (workaround) if you show the html inside Mendix, add a HTMLSnippet with a little javascript to loop over "a" tags within the tinymce viewer and use setAttribute("target", "_blank")

answered