A
A
Alexander Nameless082017-08-03 16:09:24
JavaScript
Alexander Nameless08, 2017-08-03 16:09:24

How to remove the removal of an attribute without a value in tinymce?

Hello! When setting up micro-markup in contacts, it is necessary to register itemtype=" schema.org/Organization
" for the itemscope div tag . In the tiny settings I set: valid_elements:"[*]" All tags and attributes pass, except for those attributes that have no values, specifically in this case: itemscope Does anyone know how to solve this issue?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Nameless08, 2017-09-05
@Nameless08

Actually I found the answer myself :)) In the settings, we remove the purge:

$('textarea.tinymce').tinymce({
  // Location of TinyMCE script
  script_url : '../jscripts/tiny_mce/tiny_mce.js',
        // ...
        cleanup: false,
        // ...
});

F
flexx02, 2017-09-11
@flexx02

Unfortunately, this is only relevant for version 3.X

W
webiru, 2018-01-23
@webiru

cleanup: - this is code cleaning, including from what tinymce automatically adds
if you set cleanup: false - a lot of garbage will appear in the code.
For example, tinymce styles will appear, like class="mceItemTable" - for tables.
So this option is not suitable.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question