Bug 167914 - Unexpected dialog when pasting as unformatted text
Summary: Unexpected dialog when pasting as unformatted text
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Markdown
  Show dependency treegraph
 
Reported: 2025-08-12 08:14 UTC by Heiko Tietze
Modified: 2025-08-12 15:28 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Tietze 2025-08-12 08:14:01 UTC
Paste Unformatted Text (Ctrl+Alt+Shift+V) resp. .uno:PasteUnformatted shows a dialog after the implementation of bug 162153 / https://gerrit.libreoffice.org/c/core/+/188067 that is unexpected. The function should paste unformatted text, if I want to have something else I use paste special where this markdown option is very welcome. 

STR:
Copy "Hello *brave new* world"
a) Paste as unformatted text (shift+alt+ctrl+v)
b) Paste (ctrl+v)
c) Paste special (ctrl+shift+v)

Actual result:
a) and b) Dialog pops up
c) no markdown option

Expected result:
a) Text is pasted unformatted = "Hello *brave new* world"
b) Text is pasted with formatting = "Hello <i>brave new</i> world"
(this is kind of a stretch goal and I could understand that markdown is not properly auto detected so I have to use paste special)
c) Option to paste with markdown conversion
Comment 1 Heiko Tietze 2025-08-12 08:15:37 UTC Comment hidden (off-topic)
Comment 2 Roman Kuznetsov 2025-08-12 08:24:24 UTC
Confirm the problem in current master 26.2

Heiko thanks for the report
Comment 3 Ujjawal Kumar 2025-08-12 08:41:42 UTC
(In reply to Heiko Tietze from comment #0)
> Paste Unformatted Text (Ctrl+Alt+Shift+V) resp. .uno:PasteUnformatted shows
> a dialog after the implementation of bug 162153 /
> https://gerrit.libreoffice.org/c/core/+/188067 that is unexpected. The
> function should paste unformatted text, if I want to have something else I
> use paste special where this markdown option is very welcome. 
> 
> STR:
> Copy "Hello *brave new* world"
> a) Paste as unformatted text (shift+alt+ctrl+v)
> b) Paste (ctrl+v)
> c) Paste special (ctrl+shift+v)
> 
> Actual result:
> a) and b) Dialog pops up
> c) no markdown option
> 
> Expected result:
> a) Text is pasted unformatted = "Hello *brave new* world"
> b) Text is pasted with formatting = "Hello <i>brave new</i> world"
> (this is kind of a stretch goal and I could understand that markdown is not
> properly auto detected so I have to use paste special)
> c) Option to paste with markdown conversion

Can we actually put the Markdown option in the Paste As dialog? I found no way to do that as everything is linked with mime types and no clipboard supports markdown as of now. I resorted to this strategy because the csv importer does the same thing.
Comment 4 Heiko Tietze 2025-08-12 08:51:08 UTC
(In reply to Ujjawal Kumar from comment #3)
> Can we actually put the Markdown option in the Paste As dialog?
Users don't understand MIME types. The dialog is some way to pick the right format from wherever the text comes (ie. clipboard). The technical POV might be different, of course, and I could live without c) if it's not possible.
Comment 5 Ujjawal Kumar 2025-08-12 09:02:16 UTC
(In reply to Heiko Tietze from comment #4)
> Users don't understand MIME types. The dialog is some way to pick the right
> format from wherever the text comes (ie. clipboard). The technical POV might
> be different, of course, and I could live without c) if it's not possible.

That makes sense from a user’s perspective. Given the MIME type limitations, what would you recommend as the best way forward here?
Comment 6 Heiko Tietze 2025-08-12 10:19:05 UTC
(In reply to Ujjawal Kumar from comment #5)
> ...what would you recommend as the best way forward here?
What could I answer beyond the earlier comments?
Comment 7 Ujjawal Kumar 2025-08-12 11:10:47 UTC
(In reply to Heiko Tietze from comment #6)
> What could I answer beyond the earlier comments?
Should we revert the commit then?
Comment 8 Heiko Tietze 2025-08-12 12:25:29 UTC
(In reply to Ujjawal Kumar from comment #7)
> Should we revert the commit then?
What would be the consequences?
Comment 9 Ujjawal Kumar 2025-08-12 12:52:12 UTC
(In reply to Heiko Tietze from comment #8)
> What would be the consequences?
Would have to revert 2 commits as the other one was based on this.
Comment 10 Mihai Vasiliu 2025-08-12 15:28:33 UTC
I would say I would like to have Markdown as an option in the Paste As dialog and in the Paste toolbar icon dropdown.

Maybe have the Markdown and Unformated text opeions always available when no other MIME type is detected?

This way there would be no need for any regex identification and no one would be disturbed by having that option always there in this case.