Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5cfb38a authored by stefan-niedermann's avatar stefan-niedermann
Browse files

#363 Context based formatting

- place cursor at the end of the selection after markdown has been added
parent 1b882b43
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ public class StyleCallback implements ActionMode.Callback {
                    this.addMarkdown(ssb, start, end, markdown, Typeface.BOLD);
                }
                editText.setText(ssb);
                editText.setSelection(end + markdown.length() * 2);
                break;
            case R.id.italic:
                markdown = "*";
@@ -76,6 +77,7 @@ public class StyleCallback implements ActionMode.Callback {
                    this.addMarkdown(ssb, start, end, markdown, Typeface.ITALIC);
                }
                editText.setText(ssb);
                editText.setSelection(end + markdown.length() * 2);
                break;
            case R.id.link:
                ssb.insert(end, "]()");