Code in Copy pasted HTML appears outside code blocks

Fibery rich text fields distort pasted HTML such that code appears outside code blocks. The use case here is that complete ChatGPT conversations (or other complete texts that contain code blocks) maintain their code block formatting correctly. So I’m not interested in manually copy pasting every code block.

Copied HTML (select all text including code blocks, then copy)

Result of pasted HTML in Fibery rich text field:

It should appear like the result of pasted HTML in a Notion page:

What did you highlight (on the ChatGPT page) before using copy paste?

When I do something similar, the output is pretty much what I would expect:

What browser/OS are you using and what is the copy-paste result into other applications, e.g. Word?

The copy pasting is actually a workaround for the inability of Fibery to display markdown in rich text fields.
I will check your suggestion now…

Fibery can display markdown no problem.

Do you mean that markdown which is directly pasted into a rich text field is not automatically converted into formatted text?

Yes, that is what I mean, that it does not convert automatically to formatted text.

But apart from that, my issue with copy pasting mixed text and code blocks still persistst. I am using Chrome, and tested with Microsoft Edge also, in both cases when copy pasting mixed text and code blocks into fibery, the code blocks are not correctly formatted as result.

Fibery rich text field

I tested it with a regular fibery support page copy paste, and the issue does not happen there.

So it apparently has to do with how ChatGPT formats its code blocks such that it confuses Fibery.
Hower, Notion and coda (see below) seem not to have the same issue:

With a bit of experimenting I found that it works not so well when Chrome is used for copying from the OpenAI source.
Copying from Firefox (into Fibery in FF or Chrome) works fine.

Browser standardisation? :roll_eyes:

1 Like

I confirm that in Firefox copy pasting works fine in Fibery.

It stays an issue…even when using Firefox to copy and paste in either Firefox or chrome, the code is indeed in a codeblock but the programming language label is above it also in a code block: