TinyMCE with wpLink in modal window
-
Hello!
I have an issue with the new wpLink. The previous version (the modal window, as opposed to the new modal box) was working perfectly with the following code.
So, I have code here and there to open a Bootstrap modal window, in which I have a form, several fields, and a RTE/TinyMCE.
Previous to the new wpLink, I could insert a link in that modal-ed editor, but not anymore, the new modal box just doesn’t show.
On click on the Link icon, the placeholder (_wp_link_placeholder) gets added to the MCE correctly, but no modal showing up.My form is loaded via a Backbone template, populated with the values on the modal opening, then the editor is added. It all works great, except for the new wpLink that broke with 4.5.
The textarea from the template:
<textarea class=form-control name=description id=_description>{{ data.values.description }}</textarea>
In my JS, on opening of the Bootstrap modal:
var options = $.extend( {}, tinyMCEPreInit.mceInit.content, { selector: '#_description' } ); tinyMCE.init( options );
I already read somewhere that the
modal-open
class that Bootstrap adds to the body blocks the wpLink somehow. But I got rid of the class on the opening of the modal, before MCE init, and still …
- The topic ‘TinyMCE with wpLink in modal window’ is closed to new replies.