TinyMCE, allow data attribute

前端 未结 2 879
耶瑟儿~
耶瑟儿~ 2021-01-17 11:07

I have to use the HTML 5 data attribute in Tiny MCE, but the editor always clear them, as it\'s not an attribute known by the default valid_elements configuration.

S

2条回答
  •  醉梦人生
    2021-01-17 11:38

    I am using:

    extended_valid_elements: "+@[data-options]"
    

    and it works for me. (TinyMCE 4.3.11. Notice the + sign?)

提交回复
热议问题