HTML tags separated by tinyMCE

The latest version of tinyMCE robs my nested tags and javascript when I use them. I tried to set the verify_html flag to false without knowing. Here is my js configuration for tinyMCE, can anyone see what I am doing wrong?

Refresh . I am sure this is not a server side issue. I used a plain text area without loading tinymce and it worked perfectly. This tiny MCE does a sweep.

tinyMCE.init({ // General options mode: "textareas", theme: "advanced", plugins: safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell, insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality, fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups", valid_elements: "*[*]", verify_html : false, // Theme options theme_advanced_buttons1: bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright, justifyfull,|,formatselect,fontselect,fontsizeselect|,ltr,rtl,|,fullscreen|,forecolor, backcolor,code", theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|, outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,advhr", theme_advanced_buttons3: "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media", theme_advanced_toolbar_location: "top", theme_advanced_toolbar_align: "left", theme_advanced_statusbar_location: "bottom", theme_advanced_resizing: true, height: "500px", // Example word content CSS (should be your site CSS) this one removes paragraph // margins content_css: "content/word.css", // Drop lists for link/image/media/template dialogs template_external_list_url: "lists/template_list.js", external_link_list_url: "lists/link_list.js", external_image_list_url: "lists/image_list.js", media_external_list_url: "lists/media_list.js", // Replace values for the template plugin template_replace_values: { username: "Some User", staffid: "991234" } }); 
+4
source share
1 answer

Update # 2 :

After you do more digging, you should try the following.

Set:

 media_strict: false 

And set the settings for the <embed> :

 +'embed[width|height|name|flashvars|src|bgcolor|align|play|loop|quality|allowscriptaccess|type|pluginspage]' 

Source ( MoxieCode Forum )


Update

You set extended_valid_elements but not set valid_elements ?:

 valid_elements: "*[*]" 

extended_valid_elements used for the current rule set. But valid_elements allows you to actually create this set of rules.


Old answer :

Are you sure that TinyMCE does this and not that it handles the request on the server side?

If you are using ASP.NET, make sure ValidateRequest="False" is set for the page. If you are using ASP.NET MVC, you will need to do the following on the controller action:

 [ValidateInput(false)] 

Make sure you at least use the whitelist to save the bad stuff .

+3
source

Source: https://habr.com/ru/post/1286083/


All Articles