Jump to content

GExperts Source Export

Recommended Posts

Posted (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 by PeterPanettone

Share this post

Link to post

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.

  • Like 1

Share this post

Link to post
Posted (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 by PeterPanettone

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now