Skip to content

Commit

Permalink
Editor: Disable richtext pasting which can lead to dropped characters…
Browse files Browse the repository at this point in the history
…, by @gsantner, closes #1614
  • Loading branch information
gsantner committed Jun 5, 2022
1 parent ae1abd4 commit af50efb
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,15 @@ public void withAutoFormatDisabled(final Callback.a0 callback) {
}
}

@Override
public boolean onTextContextMenuItem(int id) {
// Copy-paste fix by bad richtext pasting - example text from code at https://plantuml.com/activity-diagram-beta
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && id == android.R.id.paste) {
id = android.R.id.pasteAsPlainText;
}
return super.onTextContextMenuItem(id);
}

private void cancelUpdate() {
_updateHandler.removeCallbacks(_updateRunnable);
}
Expand Down

0 comments on commit af50efb

Please sign in to comment.