How do I customize the markdown preview plugin's panel in gedit?

V

vasa1

Guest
Hi, as background, I'm using Lubuntu 13.04. I have gedit 3.6 and I recently installed a markdown plugin from here: gedit-markdown: support for Markdown language in gedit.

It works very nicely but I have would like to know if there's any way to customize the plugin's panel. I've attached an image to show that my "regular" gedit window is the way I like it with a slightly tweaked cobalt.xml as the style.

My issue is that the lower panel has a white background which I'd like to make "less" white, like #999 or so.

I looked at ~/.local/share/gedit/plugins/markdown-preview/__init__.py and org.gnome.gedit.plugins for clues but didn't find any.

I should also mention that I've modified my ~/.themes/gtk.css to minimize white wherever possible and that other gtk3 apps apply these mods.
/* default color scheme */
Code:
/* default color scheme */
@define-color bg_color #9e9e9e;
@define-color fg_color #000043;
@define-color base_color #8e8e8e;
@define-color text_color #000;
@define-color selected_bg_color #091825;
@define-color selected_fg_color #a2e5fb;
@define-color tooltip_bg_color #333333;
@define-color tooltip_fg_color #aaaaaa;

I'm not proficient at coding but I don't mind editing text (.css, .html, .py) files if a solution lies that way.
 

Attachments

  • 20-46-19.png
    20-46-19.png
    116 KB · Views: 1,750


Okay, I had asked elsewhere and got a solution. This involves having the markdown contents between <body> and </body> tags. So , for example:

Code:
<body style="background-color: #999; color: black;" link="#0066ff">
 
**lubuntu-rc.xml**
 
A default Lubuntu installation provides two comprehensive GUI-tools to customize Lubuntu. These ....
 
</body>
gives me a preview of black text on a grey background with blue links.
 
vasa - glad you got your answer! Thanks for posting the resolution.
 
vasa - glad you got your answer! Thanks for posting the resolution.
I suspect there's a more elegant way to get what I want by pointing to an external .css file rather than including css in each markdown file but I'm not knowledgeable about programming and so I don't know what to do.
 
vasa - glad you got your answer! Thanks for posting the resolution.

Just to follow up ... I later asked here: http://stackoverflow.com/q/18024482/1771119 and based on that answer, I modified the code to look like this:
Code:
# Can be used to add default HTML code (e.g. default header section with CSS).
htmlTemplate = '''
<link rel="stylesheet" type="text/css" href="file:///home/vasa1/Dropbox/_MyMkd/mkd.css">
%s
'''
where mkd.css contains simple css to make the preview pane more "eye-friendly".
And the original, for comparison, was this:
Code:
# Can be used to add default HTML code (e.g. default header section with CSS).
htmlTemplate = "%s"
 
Last edited:

Members online


Top