1.1.3 • Published 6 years ago

jedit-rich v1.1.3

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

jsEdit

jsEdit is an extra small (2kb) rich text editor build in pure JavaScript, with no dependencies.

Live Demo: https://jedit.herokuapp.com/

Setup

Enabling jsEdit.js is very easy, you just need to follow these two simple steps:

include it from a dist/ folder

  <script src="dist/jsEdit.min.js"></script>

or

nmp install --save jedit-rich

initialize jsEdit with init()

jsEdit.init({
   // one of the pre built controls, required
  controls: 'defaultControls',

  // <HTMLElement> in which you want to put controls, required
  ctrElement: document.getElementById('controls'),

  // <HTMLElement> for rich text output, required
  outElement: document.getElementById('output'),
});

Custom controls

You can add your custom controls in config.js file. You can add to an existing set or create your own. If you do create your own share it so that other people can use it.

Quick rundown or different properties: 1. icon - this is how you choose to represent your control 2. title - is an as it name says a title 3. state - is used if a command is in a list of possible commands and does not need any additional data 4. formatBlock - is used if a command is not in a list of possible commands 5. extra - is used if a command is in a list of possible commands and does need additional data. Extra MUST return that additional data 6. short - used for toggling active class on element with keyboard shortcuts

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago