wordpress-mobile / WordPress-Editor-Android

⛔️ [DEPRECATED] A reusable Android rich text editor component.
GNU General Public License v2.0
188 stars 50 forks source link

Pasting from browser retains formatting with no option to remove #463

Closed philipjohn closed 7 years ago

philipjohn commented 7 years ago

Steps to reproduce

  1. Open a web page containing text in a browser
  2. Copy some text
  3. Paste into the android editor

Expected behaviour

Either the text is pasted as plain text (as with other apps, e.g. Simplenote) or an option is presented on the long-press action to paste as plain text.

Actual behaviour

The long-press only gives a "Paste" option and the text is pasted with formatting. Inspecting the HTML reveals an ugly span tag with a big class attribute. The only way to remove the formatting once pasted is to manually delete the HTML.

A workaround is to paste into another app which removes the formatting and from the into WordPress.

Discovered on Android 7.1.1 on a Pixel C while using WordPress app version alpha-34

nheagy commented 7 years ago

This seems reasonable to me, but I'm going to mark it as future to see how our forthcoming Aztec editor might handle the issue.

catehstn commented 7 years ago

This is addressed in Aztec, @jleandroperez worked on it <3

nheagy commented 7 years ago

Thanks for the report @philipjohn, it seems this one will be fixed in a future release 😄

jleandroperez commented 7 years ago

Just stepping by to confirm this has been addressed, but in Aztec iOS. cc'ing @0nko to confirm if it's in Android as well!

0nko commented 7 years ago

In Aztec Android text copied from other apps is pasted as plain text. Unless you copy a formatted text from within Aztec, then the styling is copied as well.