Ajouve
Ajouve

Reputation: 10089

text alignment ckeditor

I can't find how to add a button to format my text:

text-align:center;
text-align:left;
text-align:right;
text-align:justify;

I have the v4 version

http://ckeditor.com/demo

I try to find a solution but I just find some issue posts.

Maybe using a plugin ?

I'm using ckEditor like that forexemple:

<textarea id="monday" class="ckeditor" name="monday" ><?php echo $this->datas['monday']; ?></textarea>

Thanks

Upvotes: 2

Views: 9930

Answers (1)

David Silva
David Silva

Reputation: 1091

You just have to add justification to your configuration -- e.g.,

var config = {
    toolbar: [
        ['Font','FontSize'],
        ['Bold','Italic','Underline'],
        ['TextColor','BGColor'],
        ['JustifyLeft', 'JustifyCenter', 'JustifyRight']
    ],
};
$('.ckeditor').ckeditor(config);

Upvotes: 5

Related Questions