Ensure text content is always pasted as plain text (#3083)
Fixes https://github.com/tuskyapp/Tusky/issues/3082.
This commit is contained in:
parent
c07dd0f919
commit
02cadd5d33
1 changed files with 12 additions and 0 deletions
|
@ -63,4 +63,16 @@ class EditTextTyped @JvmOverloads constructor(
|
|||
editorInfo
|
||||
)!!
|
||||
}
|
||||
|
||||
/**
|
||||
* Override pasting to ensure that formatted content is always pasted as
|
||||
* plain text.
|
||||
*/
|
||||
override fun onTextContextMenuItem(id: Int): Boolean {
|
||||
if (id == android.R.id.paste) {
|
||||
return super.onTextContextMenuItem(android.R.id.pasteAsPlainText)
|
||||
}
|
||||
|
||||
return super.onTextContextMenuItem(id)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue