2.0.2 • Published 7 years ago

codex.editor.raw v2.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

npm.io

Raw HTML Tool for CodeX Editor

Raw Tool for the CodeX Editor allows to include raw HTML code in your articles.

npm.io

Installation

Install via NPM

Get the package

npm i --save-dev codex.editor.raw

Include module at your application

const RawTool = require('codex.editor.raw');

Download to your project's source dir

  1. Upload folder dist from repository
  2. Add dist/bundle.js file to your page.

Load from CDN

You can load specific version of package from jsDelivr CDN.

https://cdn.jsdelivr.net/npm/codex.editor.raw@2.0.0

Require this script on a page with CodeX Editor.

<script src="..."></script>

Usage

Add a new Tool to the tools property of the CodeX Editor initial config.

var editor = CodexEditor({
  ...
  
  tools: {
    ...
    raw: RawTool,
  }
  
  ...
});

Config Params

FieldTypeDescription
placeholderstringRaw Tool's placeholder string

Output data

This Tool returns raw HTML code.

{
    "type" : "raw",
    "data" : {
        "html": "<div style=\"background: #000; color: #fff; font-size: 30px; padding: 50px;\">Any HTML code</div>",
    }
}
2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago