PeterPanettone 158 Posted May 23 (edited) I am exporting this source code by using the excellent GExperts Source Exporter: I am using this export mode, and then click the Copy button, which copies the selected source code to the clipboard: In a post on https://www.blogger.com, in Compose view, I paste the clipboard content: Then, I select the inserted text and use the command "Text background colour": This creates the following result: However, only the text characters have a dark background. But I want the whole paragraph to have a dark background. (It should look exactly as in the Delphi Source Code Editor). How can I achieve this? I have tried tugging the HTML code for many hours but to no avail. Edited May 23 by PeterPanettone Share this post Link to post
dummzeuch 1515 Posted May 24 I have no idea how blogger works and my HTML skills are very rusty since I stopped handcrafting webpages a while ago. My approach would be to add some CSS for setting the background color for the whole section. 1 Share this post Link to post
Ian Barker 19 Posted May 24 You need to use a <PRE> tag and then set the background. This article tells you how: https://stackoverflow.com/questions/10349883/can-i-add-a-background-to-a-pre-on-blogger There are better ways of doing it - I suggest you read this post: https://blog.paoloamoroso.com/2021/10/how-to-add-code-syntax-highlighting-to.html 1 Share this post Link to post
PeterPanettone 158 Posted May 24 (edited) 7 hours ago, Ian Barker said: You need to use a <PRE> tag and then set the background. This article tells you how: https://stackoverflow.com/questions/10349883/can-i-add-a-background-to-a-pre-on-blogger There are better ways of doing it - I suggest you read this post: https://blog.paoloamoroso.com/2021/10/how-to-add-code-syntax-highlighting-to.html Setting the color in the pre-tag still sets the background color for the characters and not for the whole paragraph. Even the method described by paoloamoroso does not work for me. Edited May 24 by PeterPanettone Share this post Link to post