Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text alignment (Justify) #116

Closed
glaucioleonardo opened this issue Jun 30, 2017 · 2 comments
Closed

Text alignment (Justify) #116

glaucioleonardo opened this issue Jun 30, 2017 · 2 comments

Comments

@glaucioleonardo
Copy link

Hello! How can I justify the text?

@glaucioleonardo
Copy link
Author

glaucioleonardo commented Jul 1, 2017

I got how to Justify the text...

  1. Add a Button to your toolbar;
  2. add the onClick event listener;
  3. In the class Rich Editor just add the following method:

public void setJustifyFull() { exec("javascript:RE.setJustifyFull();"); }

  1. In the rich_editor.js add the following code
    if (document.queryCommandState('JustifyFull')) { items.push('JustifyFull'); }
    Important: The letter J and F must be in cap mode. It was not working using like this jusfityFull, justifyfull,...

@ryanw-mobile
Copy link

@wasabeef , are there any reasons for this not being provided in master branch?

I see this is already half done in the code.

richeditor/src/main/assets/rich_editor.js
if (document.queryCommandState('justifyFull')) { items.push('justifyFull'); }

Seems we just need to add setJustifyFull() {..}?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants