How to add title attribute at CKEditor images

前端 未结 2 1675
-上瘾入骨i
-上瘾入骨i 2021-01-15 22:37

Is there a way to add the title attibute to CKEditor images? I\'m using v4.1.2 and CKEditor is removing it automatically each time it\'s added from the HTML source view. I h

相关标签:
2条回答
  • 2021-01-15 22:41

    You got to define config.extraAllowedContent = 'img[title]' if you want title attribute to be accepted into editor contents (see: official guide).

    0 讨论(0)
  • 2021-01-15 23:01

    I have ultimate solution for this issue..

    1) Open this file: ckeditor\plugins\image2\plugin.js At the line number 343 (in my case) add below code title: this.data.alt just below "alt: this.data.alt," and enjoy..

    0 讨论(0)
提交回复
热议问题