Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
xdan committed Dec 10, 2019
1 parent 06b4e14 commit 91c2364
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ES2018 Version (if your users use only modern browsers)

And some `<textarea>` element

```xml
```html
<textarea id="editor" name="editor"></textarea>
```
After this, you can init Jodit plugin
Expand Down Expand Up @@ -145,7 +145,7 @@ var editor = new Jodit('#editor', {
```javascript
Jodit.plugins.yourplugin = function (editor) {
editor.events.on('afterInit', function () {
editor.seleciotn.insertHTMl('Text');
editor.selection.insertHTMl('Text');
});
}
```
Expand Down Expand Up @@ -181,6 +181,28 @@ var editor = new Jodit('.someselector', {
})
```

button with plugin

```javascript
Jodit.plugins.insertText = function (editor) {
editor.events.on('someEvent', function (text) {
editor.selection.insertHTMl('Hello ' + text);
});
};

var editor = new Jodit('.someselector', {
buttons: ['bold', 'insertText'],
controls: {
insertText: {
iconURL: 'http://xdsoft.net/jodit/logo.png',
exec: function (editor) {
editor.events.fire('someEvent', 'world!!!');
}
}
}
})
```

## Browser Support
______________________
* Internet Explorer 11
Expand Down

0 comments on commit 91c2364

Please sign in to comment.