"Paste" ribbon button doesn't preserve Rich Text when pasted from outside of Obsidian on Android

Steps to reproduce

  1. Copy any rich text from the browser or any app other than Obsidian (sentence from wiki with any links will suit)
  2. Paste text into Obsidian via ribbon Paste button
  3. Any formatting is lost, text pasted as plain text

Did you follow the troubleshooting guide? [Y/N]

Done in restricted mode.

Expected result

Rich text preserved. Here text is pasted via Hold - Paste Android UI.

Actual result

Rich text removed, pasted as plain text

I’ve circled in red ribbon button I’m referring to.


Operating system: android 13 (samsung)
Obsidian version: 1.4.16 (114)
API version: v1.4.16
Login status: not logged in
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: Things v2.1.19
Snippets enabled: 0
Restricted mode: on

Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.

Additional information

We don’t support it.
Please, open a FR for this. Thanks

1 Like

But isn’t inconsistency with default Android Paste behavior a bug?

We can keep it as a bug, but we don’t have API access to paste with formatting.

1 Like

I’m not Android developer, but here what is stated on Receive rich content Android Developers page:

Android 12 (API level 31) introduces a unified API that lets your app accept content from any source: clipboard, keyboard, or dragging.
You can attach an interface, such as OnReceiveContentListener, to UI components and get a callback when content is inserted through any mechanism.

If I understand it correctly, it’s possible to be able to paste Rich Text via UI element such as ribbon button.

Okay, I’ve read it more thoroughly, and they only mention 3 ways of pasting Rich Text - Hold, Keyboard and Drag’n’Drop. What a shame, can be closed.

This is on iOS, mind you, but I always thought and the behavior of the mobile toolbar paste icon and command (default swipe down for the command palette → Paste ) have always been “paste as plain text” even if not labeled as such.

Using iOS’s popup for “Paste” pastes rich text (it seems Android does as well).

Let me clarify a little.

If I copy rich text from inside the Obsidian (i.e. same note) Paste ribbon button will preserve Rich Text. (which left me wondering that it should be possible to do with UI element, probably has something to do with cross-app sandboxing)

Additionally, keyboard pop-up for copied to the clipboard data always pastes plain text (at least for the most notes apps I’ve used). So I don’t think there is much consistency with this behavior in the Android itself.

P.S. On iOS it’s much better as “Paste” menu can be evoked not with hold, but with a simple tap on empty space which effectively means having “Paste as Rich Text” button in every app.

I had only tried pasting text copied from outside Obsidian earlier (using the icon and command). Pasting text copied from within Obsidian using the icon + command “Paste” results in rich text pasted.

So, it seems iOS and Android behavior is at least consistent here pasting within Obsidian, with iOS being a bit easier to trigger the OS’s “Paste” pop-up.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.