Hello,
I use jquery validation plugin. All is well.. Take data from the editor tinyMCE and filter it - all html tags
with javascript function strip_tags(), analogue php.
After I made clear the contents of the text of the tag needs to do a new filtering.
Just new filtering the resulting text.
- $.validator.addMethod(
- "regex",
- function(value, element, regexp) {
- var editorContent = strip_tags(tinyMCE.get('content').getContent());
- //alert(editorContent);
- var re = new RegExp(regexp);
- return this.optional(element) || re.test(value);
- });
I do not know how to pass argument (editorContent) to var re = new RegExp(regexp);
Thanks!