Jump to content
PeterPanettone

GExperts Source Export

Recommended Posts

Posted (edited)

I am exporting this source code by using the excellent GExperts Source Exporter:

 

image.thumb.png.f006c94b60bdade4fc62e325e9d01677.png

 

I am using this export mode, and then click the Copy button, which copies the selected source code to the clipboard:

 

image.png.000a6a8993d3db80d9840e09353627cf.png

 

In a post on https://www.blogger.com, in Compose view, I paste the clipboard content:

 

image.thumb.png.64e3be226722bc7481aa456a96991a9c.png 

 

Then, I select the inserted text and use the command "Text background colour":

 

image.thumb.png.88b095ce16cdeb3af0f699979069db2b.png 

 

This creates the following result:

 

image.thumb.png.b9414069d5730d2cc910886d38a66666.png 

 

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
×