简体   繁体   中英

TinyMCE Custom Elements with a ' : '?

So I'm looking to allow Thymeleaf tags inside my TinyMce Editor (using angular-ui-tinymce if that matters)

I understand the basic format

 extended_valid_elements : 'script[charset|language|type|src]'

but how would I use this to allow for things like

 <p th:text="..."> //or// <img th:src="..."/>

Before anyone asks, yes it is necessary to have both tinyMce and thymeleaf, and No I don't need the thymeleaf to work inside tinymce, I just need the editor to stop stripping the tags.

尝试将其放入您的TinyMCE配置中:

valid_elements: "*[*]"
extended_valid_elements : 'img[th::text]'

Double colon symbol works as a single ':' char, but unfortunately you can't add attribute to * (any element) in extended_valid_elements. But you can list all needed elements.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM