Improve the Rich Text editor behavior for code snippets

This is a dedicated post to highlight the importance of a well-functioning rich text editor, that is useful for people like developers (which group is growing fast) to document a mix of code snippets and documentation.

There are some issues with:

Importing or pasting code snippets, as well as mix of text and code snippets, where code blocks are not displayed well, with risk of text corruption. A simple script to convert Markdown to rich text? - #8 by Yuri_BC

The lanuage specifier in pasted code is deleted by the rich text editor upon pasting it. It require manually reselecting it. How to insert the programming language for a code block?

All this is very problematic for developers that may want to use Fibery.

I question the choice for ProseMirror, since ProseMirror is designed as a framework for building custom rich-text editors, allowing for deep customization. However, this level of control also requires more development effort (which may not be Fibery its priority or ability), as compared to more out-of-the-box solutions like TinyMCE or CKEditor, which offer a wide range of features and plugins with less initial setup.