How to make an element in a TinyMCE editor treated as a non-editable single item?

前端 未结 4 1022
北恋
北恋 2021-02-04 11:14

Within our CMS, our users can edit error messages for forms using TinyMCE. The problem is, some of these messages may require dynamic data, e.g. \"Your chosen name \'X\' i

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-04 12:01

    You could use an image-tag as token. Using a tinymce UI button to insert this image should work if you replace it after the user has submitted the error message form. For example the image tag you insert could look like this

    
    

    This way you only need to replace image-tags with the class token1 after the submit/save.

提交回复
热议问题