It is fixed in Version 9.0.3: http://imperavi.com/redactor/log/
RedactorJS: linebreaks true -> Alignment does not work
-
01-06-2022 - |
Question
I use the RedactorJS as my WYSIWYG editor.
Initialize redactor:
$( '#myeditor' ).redactor( { linebreaks: true } )
Then the alignment does not work anymore. Set linebreak:false
(this is default) than everything is ok.
Are there any solutions?
Answer from the Redactor support
The reason is that we'll have to wrap your lines with a div to apply alignment, and many customers didn't want this to happen. However, we are considering changes in this behavior and may allow such wrapping and alignment soon.
Solution 2
OTHER TIPS
The alignement is apply on <p>
element, so your problem is logic. You must create a plugin that adds a frame around the content selected. Then you change the alignment value. You can modify alignmentSet
function on redactor.js
Redactor support should fix it.
It is fixed in Version 9.0.3: http://imperavi.com/redactor/log/