Results 1 to 4 of 4

Thread: Help wanted with customising the markdown panel in gedit

  1. #1
    Join Date
    Dec 2007
    Beans
    11,381

    Help wanted with customising the markdown panel in gedit

    I have gedit 3.6.2 and I've installed a plugin (gedit-markdown: support for Markdown language in gedit) that allows me to preview markdown text as html in a separate panel within gedit.

    I want to know if it's possible to change the background color of the lower panel from white to something else like #999. My guess is that I may need to edit some css in my theme. I'm using Greybird (from "shimmer-themes" in the Software Center).

    For the upper (main) panel, I use a slightly modified Cobalt color scheme.
    Attached Images Attached Images
    Users can easily damage their systems by using sudo su if they aren't experienced enough.

  2. #2
    Join Date
    Dec 2007
    Beans
    11,381

    Re: Help wanted with customising the markdown panel in gedit

    I can get what I want by including:
    Code:
    <link rel="stylesheet" type="text/css" href="file:///home/vasa1/mkd.css">
    at the top of each markdown file where mkd.css contains the style I wish to apply to the html preview. However, this requires editing each of my existing markdown files.

    I'm hoping there's a way to do this by modifying the plug-in itself so as to avoid adding this code to each markdown file but that seems to require knowledge of Python
    Last edited by vasa1; August 2nd, 2013 at 06:10 AM. Reason: added stuff
    Users can easily damage their systems by using sudo su if they aren't experienced enough.

  3. #3
    Join Date
    Dec 2007
    Beans
    11,381

    Re: Help wanted with customising the markdown panel in gedit

    By way of a "bump", the image shows how markdown (right) is displayed as html (left).

    I looked at~/.local/share/gedit/plugins/markdown-preview/__init__.py for any changes a non-Python, non-coder person can make easily. The closest thing I can think of is:
    Code:
    # Can be used to add default HTML code (e.g. default header section with CSS).
    htmlTemplate = "%s"
    lines 39 and 40 in the link over here: http://paste.ubuntu.com/5938766/
    but I don't know how to proceed, if that is indeed what has to be changed.
    Attached Images Attached Images
    Users can easily damage their systems by using sudo su if they aren't experienced enough.

  4. #4
    Join Date
    Dec 2007
    Beans
    11,381

    Re: Help wanted with customising the markdown panel in gedit

    Users can easily damage their systems by using sudo su if they aren't experienced enough.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •