How to validate WYSIWYG Editor in site studio contributor.
I have developed a custom button using custom configuration script and Element Definitions which pops up the dropdown list to drop the snippet code in the editor. Once it is inserted I want to validate it to check if the snippet has already been inserted. I also need to insert a kind of hidden field or greyed out area to show the snippet exists on editor. This should definitely not be visible on site.
The snippet will have opening and closing tags like <!-- $..... --> . Any help is greatly appreciated.
Here's the complete code.
(function()
{
var WYSIWYGInsertInlineItem = function()