Giter Site home page Giter Site logo

cbmarkdown's Introduction

Table of Contents

cbMarkdown

A markdown render preview plugin for Code::Blocks IDE.

This plugin allows you to render a preview of markdown-files and displayed in a property grid. This plugin uses the discount markdown to html library. For supported sysntax see the discount webpage.

Features and limitations

  • This plugin uses the discount library to render the markdown to html. So all features and limitations of this library apply to this plugin also.
  • The plugin uses the system provided web rendering ( for ex. IE7 on Windows) or the wxWidgets provided renderer. The later does not provide CSS support
  • Embed images do not render at the moment
  • External Links are opened in the system browser.
  • Local (file internal links) work only if you use the <a name="index"></a> syntax

Screen shots

Windows 7 with native renderer screen shot windows 7 native

Windows 7 with wxWidgets renderer screen shot windows 7 wxWidgets

Xubuntu with native renderer screen shot Xubuntu native

Xubuntu with wxWidgets renderer screen shot Xubuntu wxWidgets

The plugin settings window on windows 7 Screen shot register view windows

Getting Started

At the moment there are no binary builds available for this plugin so you have to build it by yourself.

Prerequisites

Codeblocks

You need the source of codeblocks and install it by hand: An instruction to build Code::Blocks can be found here After the build and installation of codeblocks you should have a folder with the codeblocks source similar to this:

/home/test/programming/codeblocks_source/

In this folder there should be a folder called src, m4 and debian. The Code::Blocks source code should be found under src

wxWidgets

A installed and running wxWidgets library with version 3.X.X (you need this also for building Code::Blocks)

discount

You need the discount library on your system. Please read the README found in the discount folder for instructions to build it on your system.

After the installation of the discount library there should be the following folder on your system

discount installation directory (provided by --prefix switch during configure)
|---bin
|       markdown
|---include
|       mkdio.h
|---lib
    |   libmarkdown.a
    |---pkgconfig

cbMarkdown

To get the code for this plugin you can clone the git repo or download the code as zip archive.

Installing

  1. Build a Code::Blocks version with wxWidgets version 3.X.X

  2. To build the plugin simply open the project file corresponding for your operating system:

  • windows: cbMarkdown.cbp
  • linux: cbMarkdown_unix.cbp
  • mac: Sorry, i don't have a mac to provide any project file... Help is welcome...

After opening the project codeblocks will ask you about two global variables:

cb: this is the source ditectory of codeblocks. Set base to your codeblocks source folder

/home/test/programming/codeblocks_source/src

discoutn: Configure the global variable to point to the installation folder of your discount repository

You can configure the global variable later under:

  • Settings->Global variables
  • Select cb on the left list
  • Set the path in the base field
  1. select the cb_plugin_wx30 target from the drop down menu near the build button
  2. Hit the build button
  3. Fix errors (there should not be any errors ;) )
  4. Open your productive codeblocks program
  5. Plugins->Manage plugins->Install new
  6. Browse to
/home/test/programming/cbSystemView_source/plugin_wx30

and select the plugin to install.

!!NOTE: The plugin can only run in a Code::Blocks version compiled with the same compiler and the same wxWidgets version.

Using the plugin

You can activate the window by the menu View->Markdown view If you open an editor tab with a file that has a registered file ending the view window will show you the rendered markdown file. By default registered ist the .md ending. After Switching tab the view remains in the last markdown file.

Set up file filter

You can customize the file ending trigger in the menu Settings->Editor->cbMarkdown->File extensions. Enter the file ending of the file without . and separated by a semicolon ;.

Set up render engine

If you have problems with the render engine you can switch it with Settings->Editor->cbMarkdown->Render technology:

  • Html view: The wxWidgets internal render engine is used. No CSS support or complicated rendering
  • Web view: The operating system default rendering engine is the used to render the HTML page. Under Windows the IE7 Engine is used (see wxWidgets documentation)

Set up custom css

You can set up custom CSS renderer in Settings->Editor->cbMarkdown->CSS used for webview. This takes only affect if the Web view renderer is active. You can reset to the plugin default css with the button Reset CSS

Contributing

Any bug report, new idea, patch, pull requests are welcome.

Changelog

No actual release

Authors

  • bluehazzard - Initial work

License

This project is licensed under the GPL v3 License - see the LICENSE.md file for details

Acknowledgments

The whole Code::Blocks team

cbmarkdown's People

Contributors

bluehazzard avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.