Giter Club home page Giter Club logo

markitup's Introduction

MarkItUp Editor

Integrates the MarkItUp Editor (Markdown and Textile) into REDAXO CMS.

Screenshot

Textarea fields with the class markitupEditor-%profileName% will automatically be turned into a proper MarkItUp editor field, for example:

<textarea id="markitup_full" class="markitupEditor-full"></textarea>

You can setup multiple profiles with different configurations to use with the MarkItUp editor in the backend.

You can even define your own skin for the editor using CSS. To do so, add a file called skin.css in the folder /assets/addons/markitup.

Markdown

Module input:

<fieldset class="form-horizontal">
  <div class="form-group">
    <label class="col-sm-2 control-label" for="value-1">VALUE 1</label>
    <div class="col-sm-10">
      <textarea class="form-control markitupEditor-markdown_full" id="value-1" name="REX_INPUT_VALUE[1]">REX_VALUE[1]</textarea>
    </div>
  </div>
</fieldset>

Module output:

<?php
  echo markitup::parseOutput ('markdown', 'REX_VALUE[id=1 output="html"]');
?>

Textile

Module input:

<fieldset class="form-horizontal">
  <div class="form-group">
    <label class="col-sm-2 control-label" for="value-1">VALUE 1</label>
    <div class="col-sm-10">
      <textarea class="form-control markitupEditor-textile_full" id="value-1" name="REX_INPUT_VALUE[1]">REX_VALUE[1]</textarea>
    </div>
  </div>
</fieldset>

Module output:

<?php
  echo markitup::parseOutput ('textile', 'REX_VALUE[id=1 output="html"]');
?>

Create new profile

Example code for use in templates, modules or AddOns:

<?php
  if (!markitup::profileExists('simple')) {

    // name, description, type (markdown/textile), min height, max height, url type (relative/absolute), buttons
    markitup::insertProfile ('simple', 'Simple editor', 'textile', 300, 800, 'relative', 'bold,italic');
  }
?>

markitup's People

Contributors

christophboecker avatar phoebusryan avatar schuer avatar skerbis avatar ingowinter avatar nandes2062 avatar staabm avatar gharlan avatar schorschy avatar ynamite avatar madiko avatar tbaddade avatar polarpixel avatar ngwngw avatar interweave-media avatar ytraduko-bot avatar imgbotapp avatar alxndr-w 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.