CKEditor - Remove encapsulating paragraph tags

CKEditor - Remove encapsulating paragraph tags

peterbrownepeterbrowne Posts: 314Questions: 54Answers: 0

I have asked this question before. I know it's a problem with the WYSIWYG editor, not Datatables. However, I still haven't found a solution.

I have found using basicEntities: false might work.

https://stackoverflow.com/questions/14523293/how-to-prevent-ckeditor-replacing-spaces-with-nbsp

But I don't know where to put that line. I assume it goes in the ckeditor scripts somewhere...

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,564Questions: 1Answers: 10,479 Site admin
    Answer ✓

    Use the opts parameter of your field configuration to pass options to CKEditor - e.g.:

    {
      name: '...',
      type: 'ckeditorClassic',
      opts: {
        basicEntities: false
      }
    }
    

    See line 54 of the plug-in for where the opts property is used.

    Allan

  • peterbrownepeterbrowne Posts: 314Questions: 54Answers: 0
    edited April 2023

    Alternatively I could use a normal text area, instead of a single line text field. How would I do that?

  • peterbrownepeterbrowne Posts: 314Questions: 54Answers: 0

    OK...type: "textarea"

Sign In or Register to comment.