richeditor-android icon indicating copy to clipboard operation
richeditor-android copied to clipboard

TextState saying whether it is bold, italic, normal, subscript and superscript.

Open kasa111326 opened this issue 7 years ago • 2 comments

How do we know whether text state is bold or not when cursor move to particular position.

kasa111326 avatar Mar 27 '17 09:03 kasa111326

Try this

 mEditor.setOnDecorationChangeListener((text, types) -> {
            Timber.d("onStateChangeListener() called with: text = [" + text + "], types = [" + types + "]");

            for (RichEditor.Type type : types) {
                switch (type) {

                    case BOLD:
                    case UNDERLINE:
                    case ITALIC:
                        break;

                }
            }
        });

beczesz avatar Oct 08 '20 15:10 beczesz

its not getting callback when style changes if we delete text.

Piyushandroidch avatar Apr 07 '21 04:04 Piyushandroidch