From fcf88505230945c6760f604fd945ffc6a462ab2d Mon Sep 17 00:00:00 2001 From: JOhan De Clercq Date: Thu, 30 May 2019 10:10:43 +0100 Subject: [PATCH] function removePlaceholder to check editor.enterMode This change is essentially the fix for issue #7 --- plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.js b/plugin.js index a74f256..eb35836 100644 --- a/plugin.js +++ b/plugin.js @@ -74,7 +74,7 @@ root.removeClass( 'placeholder' ); // fill it properly if (CKEDITOR.dtd[ root.getName() ]['p']) { - root.setHtml( '


' ); + root.setHtml( editor.enterMode === CKEDITOR.ENTER_P ? '


' : (editor.enterMode === CKEDITOR.ENTER_DIV ? '

' : '
') ); // Set caret in position var range = new CKEDITOR.dom.range(editor.document); range.moveToElementEditablePosition(root.getFirst(), true);