GithubHelp home page GithubHelp logo

koelkast / kirby-simplemde Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rasteiner/kirby-simplemde

0.0 1.0 0.0 409 KB

Kirby Markdown Editor using SimpleMDE

PHP 0.89% CSS 1.40% JavaScript 97.70%

kirby-simplemde's Introduction

SimpleMDE for Kirby Buy me a beer

This is a textarea with Markdown highlighting using SimpleMDE.

Preview

Installation

Put the kirby-simplemde-master folder into your site/plugins folder and rename it to simplemde.

You can then replace your textarea fields with simplemde like that:

text:
  label: Text
  type:  simplemde

Features

Compared to the built-in textarea, this field has some advantages:

  • Live Markdown highlighting. Including green Kirbytags.
  • Undo/redo via Ctrl/โŒ˜ + Z/Y.
  • No modals for URLs and email addresses as this prevents the buttons from showing in structure fields.
  • Automatic link/email detection when selecting text and using the link or email button.
  • Easy to add custom buttons
  • Sticky toolbar on the top for better reachability

Options

Buttons

By default the following buttons are displayed:

  • h2
  • h3
  • bold
  • italic
  • unordered-list
  • ordered-list
  • link
  • pagelink
  • email

There are also some more built-in buttons:

  • h1
  • quote
  • code
  • horizontal-rule

You can define what buttons you want to use for any field:

text:
  label: Text
  type:  simplemde
  buttons:
    - h1
    - italic
    - link

And you can also globally define default buttons for any SimpleMDE field on your site by setting the simplemde.buttons variable in your config.php (Thank you, rasteiner):

c::set('simplemde.buttons', array(
  "bold",
  "italic",
  "link",
  "email"
));

Page link

As of version 1.1.2 this field will automatically hide modules and modules container pages with the title _modules from the page list. To include them you can add this to your config.php:

c::set('simplemde.excludeModules', false);

Highlighting

If you don't want to highlight Kirbytags you can add this to your config.php:

c::set('simplemde.kirbytagHighlighting', false);

Replace core textarea

You can replace the core textarea with this setting in your config.php:

c::set('simplemde.replaceTextarea', true);

kirby-simplemde's People

Contributors

medienbaecker avatar usrlibzy avatar davidelanfranchi avatar alkinkasap avatar

Watchers

James Cloos 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.