0

How does ckeditor4 implement adding div instead of p on enter


below is what I tried.

I tried debugging to understand the keyinput transformation logic(enter to div tag). I used Chrome dev tools and vscode with the ckeditor4 source files.

I set the 'enterMode: CKEDITOR.ENTER_DIV' in my html code.(default is ENTER_P)

Then I set the 'Event Listener breakpoint(keydown event)' on Chrome dev tools to start to find out the code lines inserting tag to html when the enter key was pressed.

I also set the breakpoints at all the files which contains the word 'enterMode'(like editor.js, editable.js, htmldataprocessor.js, tools.js)

But debugger never reached any of the breakpoint lines except the filter.js file. It was reached only the first time the page was loaded.

After all, I could not find out the enter key transformation logic at the runtime.

What features should I know to figure out how enterMode is used?

thank you!

Glenn
  • 1

0 Answers0