Search code examples
ckeditorckeditor4.x

Change wrapper tag when using justify


I'm using ckeditor 4 and when I trying to justify text http://prntscr.com/iq2l8g

it's wrapping in div.

<div text-align="align-direction">TEXT</div>

How can I change it's wrapper to <p text-align="align-direction">TEXT</p>? Thanks


Solution

  • If you try online sample - https://sdk.ckeditor.com/samples/fullpreset.html (please remove all the data, type few characters and try to justify the text) you will notice that once you have justified and switched to source mode, there is a P and not the DIV.

    I will make a guess that you are using enterMode set to DIV instead of P thus you are seeing such result. Justify plugin itself doesn't change tags. It only adds classes to existing tags.