mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-10-25 14:15:48 +03:00
#363 Context based formatting
- place cursor at the end of the selection after markdown has been added
This commit is contained in:
parent
1b882b43fa
commit
d5cfb38ac5
1 changed files with 2 additions and 0 deletions
|
@ -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, "]()");
|
||||
|
|
Loading…
Reference in a new issue