Hi Team,
I have been using the RichTextEditor for my CMS application where I need to mention some code as well but whenever I paste code into the richtexteditor and select insert code option the format of the code gets distorted as shown in the below screenshot.

Please let me know the solution to beautify the code view in the rich text editor.
Also, when I paste code from VSCode it takes the format of VSCode but when I select the Insert Code option the format gets distorted as well in the RTE.
Although the former content looks good in the HTML label but the later looks bad as well in the HTML label as well as shown in the below screenshot.

Kindly let me know the solution of the above.