1

I have tried using

config = {
    height: 250,
    enterMode: 'CKEDITOR.ENTER_DIV',
  };
}

But this doesn't work. It still puts a paragraph tag instead of the div tag in the source.

What am I missing here -

https://stackblitz.com/edit/ckeditor-3efz3n?file=app%2Fapp.component.ts

1 Answer 1

2

You sholw not use it as a string there is no meaning to CKEDITOR.ENTER_DIV. You should import the value from the source code or use the number 3

If you would like to import:

config = {
    height: 250,
    enterMode: CKEDITOR.ENTER_DIV, // It's a variable not a string like in the question
  };
}

Or without import you can do it will fix your issue:

config = {
    height: 250,
    enterMode: 3
  };
}

I have found the number 3 in The ckEditor source code.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.