Expand my Community achievements bar.

SOLVED

How to do full justify in RTE

Avatar

Level 4

How to do full justify(justify on both left and right) in RTE apart from

justify#justifyleft

justify#justifycenter

justify#justifyright

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

OOTB you can do justify left, right and centre. which basically add inline style text-align:<value>. e.g. text-align:left

You can modify existing plugin and add one more option/type alignment which is text-align:justify

Thanks

Arun



Arun Patidar

View solution in original post

5 Replies

Avatar

Correct answer by
Community Advisor

Hi,

OOTB you can do justify left, right and centre. which basically add inline style text-align:<value>. e.g. text-align:left

You can modify existing plugin and add one more option/type alignment which is text-align:justify

Thanks

Arun



Arun Patidar

Avatar

Level 2

Hi @Deleted Account 

 

Is it possible to extend the functionality of this plugin to vertical-align: top/middle/bottom ?

If yes, then where can I add the on click events of those icons.

 

Thanks.

Avatar

Level 4

Thanks for the response

Which one should i be using for existing plugin js, both carry the same code( i tried coralui2 path)

/libs/clientlibs/granite/richtext/core/js/plugins/JustifyPlugin.js

/libs/cq/ui/coralui2/rte/core/plugins/JustifyPlugin.js

Within the JS is this the correct way to add justify full

'justify': {

              'title': CUI.rte.Utils.i18n('plugins.justify.fullTitle'),

              'text': CUI.rte.Utils.i18n('plugins.justify.fullText')

            }

Please suggest

TIA

Avatar

Community Advisor

HI,

You should be using granite UI rather than coarl2.

/libs/clientlibs/granite/richtext/core/js/plugins/JustifyPlugin.js is the plugin file but you need to add extra plugin option in dialog jsp file as well.

/libs/dam/cfm/admin/components/authoring/contenteditor/toolbar/toolbar.jsp

Thansk

Arun



Arun Patidar

Avatar

Level 2

Just use :

justify#justifyjustify

It worked for me well.