How to add class or attribute automatically to img tags in CKEditor?

前端 未结 5 1845
眼角桃花
眼角桃花 2020-12-31 21:20

I\'m using CKEditor version 3.6

I want to automatically add class=\"newsleft\" to any image tag added through the WYSIWYG.

I\'ve seen a few post

5条回答
  •  滥情空心
    2020-12-31 22:17

    in Version: 4.5.3

    1. Look up image.js in /ckeditor/plugins/image/dialogs/image.js
    2. Search for editor.lang.common.cssClass
    3. You will find: editor.lang.common.cssClass,"default":""
    4. Edit it with your class name(s) such as: editor.lang.common.cssClass,"default":"your-class-name"

提交回复
热议问题