Skip to content
This repository has been archived by the owner on Jul 25, 2021. It is now read-only.

Bug: buttons don't show they are checked, and bold-button doesn't seem to work #37

Closed
AndroidDeveloperLB opened this issue Feb 18, 2018 · 14 comments

Comments

@AndroidDeveloperLB
Copy link

After cloning the repo, I've noticed some issues with the buttons:

  • They do not change their look when pressing them
  • the Bold button doesn't seem to work, and its icon is positioned on its top boundary for some reason.
  • The style is applied for the entire paragraph, instead of from the current caret location.
  • There is no underline button

See attached video:
device-2018-02-18-144245.zip

@kartikwatwani
Copy link

@AndroidDeveloperLB Did you find the solution to the bug ?

@AndroidDeveloperLB
Copy link
Author

No. I'm using a different library for now.

@kartikwatwani
Copy link

Which one ? Can you provide the link?

@AndroidDeveloperLB
Copy link
Author

@kartik2206 Sadly I've tried so many, and each had a different, serious issue.
This is currently what we use:
https://github.com/1gravity/Android-RTEditor
It's not perfect, and it doesn't seem to be supported anymore, but we had to choose something...
If I had the time, I would have made something myself.

@kartikwatwani
Copy link

Thank you. I will see what I can do to improve these editors or I will try making one myself.

@irshu355
Copy link
Owner

  1. Toolbar can be added by urself, just call the respective methods on their onclick event
  2. See 1
  3. I created it to more to emulate the medium.com editor. So styling is applied on a block level instead of inline. If this is the case, let me suggest https://github.com/wasabeef/richeditor-android.
  4. Sorry about that, will add it on the future.

@AndroidDeveloperLB
Copy link
Author

AndroidDeveloperLB commented Feb 22, 2018

@irshuLx 1+2. Can you please fix the sample, then? So that we can learn better how to use the library?
Does the library tell when a button should be checked/unchecked, and allows to query the state (needed when re-initializing, for example after changing orientation) ?
3. Is it possible to have a more standard behavior, like on Google Docs and MS word ?
4. Thank you. Is it possible to add checkbox-list ? Not sure even if such a thing is possible.
5. In order to save to HTML, you use getContentAsHTML , right? What about importing from such a content? Is it render(String html) ?

@AndroidDeveloperLB
Copy link
Author

AndroidDeveloperLB commented Feb 22, 2018

@kartikwatwani
Copy link

Thank you so much, I will try importing them or I will just use this editor for editing and WebView for rendering.

@AndroidDeveloperLB
Copy link
Author

@kartik2206 OK, if you do, please update how you did it, via the links I've updated now.

@kartikwatwani
Copy link

kartikwatwani commented Feb 22, 2018

@AndroidDeveloperLB I got why the bold and italics were not working. Go to InputExtension class and change these types of lines
editText.setTypeface(getTypeface(textMode, Typeface.ITALIC));
with
editText.setTypeface(editText.getTypeface(), Typeface.ITALIC);
in boldifyText and italicizeText function.
getTypeFace(arg1,arg2) function of InputExtension class looks buggy.

In general we have to change getTypeface(textMode with editText.getTypeFace() and remove an extra ) at the end of each line.

@kartikwatwani
Copy link

@AndroidDeveloperLB And the Bold button was not centered. The issue is in editor_toolbar_linearlayout_horizontal.xml ImageButton element was slightly different than other ImageButton elements. Just make it same(except id and image src) as other element and it will be fine.

@kartikwatwani
Copy link

@irshuLx Thank you so much for this great editor :) 👍 👍 👍 👍 👍 👍

@irshu355
Copy link
Owner

thanks guys. If you can make any contributions, i'll b happy to merge it. I'm tightly coupled with some work at the moment; once i get some me-time around next week, i'll work on it.

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

No branches or pull requests

3 participants