CKEditor: Class or ID for editor body

后端 未结 7 1584
深忆病人
深忆病人 2020-12-03 18:10

I have an instance of CKEditor on a page. I am trying to give the CKEditor\'s body a class or ID so it matches some styles I have defined in a stylesheet.

There is a

7条回答
  •  遥遥无期
    2020-12-03 18:23

    In config.js, write this code

    config.bodyId = 'contents_id';
    

    then you see body id in Ckeditor but when you want to access this id please use

    $('#parent_id').find('iframe').contents().find('#within_iframe')
    

    there $('#parent_id') means form_id or any parent which is simply way to access iframe. follow this code to access element in iframe

提交回复
热议问题