D
D
Denis2020-01-28 16:15:04
1C-Bitrix
Denis, 2020-01-28 16:15:04

Bitrix visual editor removes tags?

Faced such a problem, the visual editor in Bitrix, when adding news in the news component, removes the svg tag with all content. Leaves only the wrapper. Let <div><svg>content</svg></div>'s say it leaves empty divs. Moreover, this does not happen immediately. Added news, saved, everything is ok. If you just edit something in this news and click save. All tags disappear along with the content. Nobody faced?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Tsymbal, 2020-01-29
@AlexanderTsymbal

Faced. It is pointless to fight with the Bitrix editor.
There are 2 options:
1. Prohibit site moderators who have no experience with html / php code from touching the site content. And to edit and save it yourself with the editor turned off, only in html / php code modes. If the client agrees to support the site on outsourcing (in your person) - then it’s even good for you, there will be constant work :).
2. Organize the structure of the edited sections of the code in such a way that <svg>other "unwanted" tags for the Bitrix editor do not "meet" the editor. This, of course, will inflate the number of includes, which will slightly reduce the page loading speed. But nevertheless, you can give the project to the client with a clear conscience, without fear that something will go to hell on the first edit:

A
asof, 2021-11-30
@asof

Suddenly it will come in handy for someone whose editor cuts the span)
In the editor settings, by the gear in the upper right corner, uncheck "Clear <span> tags without attributes"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question