Code Monkey home page Code Monkey logo

itop-markdown-viewer's Introduction

๐Ÿ‘‹ Available on Molkobain I/O

iTop extension: molkobain-markdown-viewer

Description

Easily edit fields in Markdown without any modification to your datamodel! Perfect for FAQs and many others objects ๐Ÿ‘Œ

Advanced features support such as headings, emphasis, lists, images, hyperlinks, highlighting, code formatting...

Description decoration

Instant preview of Markdown rendering while editing Preview while editing

Fully compatible with the enhanced portal in both visualization... Portal visualization

... and edition with instant preview Portal editing Portal preview

Online demo

You can try this extension on the online demo. There are already some FAQs with a markdown description as an example. Just click on the links below to access it:

Note: Mind to logout before switching between console & portal.

Compatibility

Compatible with iTop 2.7+

Dependencies

  • Module molkobain-handy-framework/1.3.0
  • Module molkobain-newsroom-provider/1.0.1

Note: All dependencies are included in the dist/ folder, so all you need to do is follow the installation section below.

Downloads

Stable releases can be found on the releases page or on Molkobain I/O.

Downloading it directly from the Clone or download will get you the version under development which might be unstable.

Installation

Installation procedure is the same as for any iTop extension, just follow the instruction on the iTop official documentation here.

Configuration

Out of the box this extension doesn't change any attributes, you have to configure which attributes you want to be rendered as Markdown. To do so, take a look at the markdown_attributes parameter in the next section.

Parameters

Some configuration parameters are available from the Configuration editor of the console:

  • enabled Enable / disable the extension without having to uninstall it. Value can be true or false.
  • markdown_attributes Class attributes to enable as Markdown. Value must be an array of classes, each containing an array of the attributes you want to render as Markdown. Default value is none, you have to set which ones you want!
  • markdown_options Allow to set the options of the Markdown converter (Showdown.js), check the dedicated wiki page to see them all.

Example:

'molkobain-markdown-viewer' => array (
  'enabled' => true,
  'markdown_attributes' => array(
    'Service' => array('description'),
    'ServiceSubcategory' => array('description'),
    'FAQ' => array('summary', 'description'),
  ),
  'markdown_options' => array(
    'tables' => true,
  ),
),

Contributors

I would like to give a special thank you to the people who contributed to this:

  • Bostoen, Jeffrey a.k.a @jbostoen

Licensing

This extension is under AGPLv3.

Third party libs

This extension is based on the awesome Showdown library. For more information visit its website.

itop-markdown-viewer's People

Contributors

molkobain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ops-itop aliuly

itop-markdown-viewer's Issues

Add datatables style to markdown tables

For now, tables generated from the Markdown have a very basic style and are pretty ugly.

@v-dumas suggested that we apply the same style than other tables in the app. This should be done on both the admin. console and the portal.

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.