TinyMCE - Links failing when links contain any tags

Viewed 37

I have TinyMCE 5.x (cdn file says 5.10.3-128) loaded within a website manager. I use the following link to load TinyMCE https://cdn.tiny.cloud/1/\<apikey\>/tinymce/5/tinymce.min.js. This forwards to the following location https://cdn.tiny.cloud/1/no-origin/tinymce/5.10.3-128/tinymce.min.js.

I have the "code" plugin loaded. Anytime I add a link through the "code" plugin that contains any kind of tag within it, but especially block tags, it fails to actually add the link to the content. For example the link <a href="https://www.google.com">Test</a> works fine, but \<a href="https://www.google.com"\>\<div\>Test\</div\>\</a\> ends up with \<div\>Test\</div\> within the code.

This also accurs within a special paste processor that I have. At the end of the paste process the code is pasted into TinyMCE with the function tinymce.activeEditor.selection.setContent(). If I where to pass the html \<div\>\<a href="https://www.google.com"\>\<div\>Testing\</div\>\</a\>\</div\> to that function, the code displayed would be correct, but none of the controls will act upon the link, and loading the "code" plugin will show \<div\>\<div\>Test\</div\>\</div\>. Which is also the html returned by the function tinymce.activeEditor.getContent().

I have also tried using the specialty link manager I implemented. That uses the function tinymce.activeEditor.selection.setNode() to create a link. If I select more than one line within the editor the link isn't created (at least as far as set/get content is concerned).

This started happening today, sometime in the afternoon. One of my employees that was working with TinyMCE says everything was working fine, then all of a sudden it stopped working.

If anyone has any idea what might have changed, or what I can do to have this functionality work again, it would be greatly appreciated.

0 Answers
Related