Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 9158209

Browse files
committed
docs(read.me): Add blurb about setup function and event binding
Closes 201
1 parent 2e8df1e commit 9158209

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,23 @@ _The ui-tinymce directive stores the configuration options as specified in the [
7777

7878
The directive supports all of the standard TinyMCE initialization options as listed [here](http://www.tinymce.com/wiki.php/Configuration).
7979

80+
Use the [setup](https://www.tinymce.com/docs/configure/integration-and-setup/#setup) function to bind different events:
81+
82+
```javascript
83+
scope.tinymceOptions = {
84+
setup: function(editor) {
85+
//Focus the editor on load
86+
$timeout(function(){ editor.focus(); });
87+
editor.on("init", function() {
88+
...
89+
});
90+
editor.on("click", function() {
91+
...
92+
});
93+
}
94+
};
95+
```
96+
8097
In addition, it supports these additional optional options
8198

8299
- `format` Format to get content as, i.e. 'raw' for raw HTML, or 'text' for text only. Defaults to 'html'. Documentation [here](http://www.tinymce.com/wiki.php/api4:method.tinymce.Editor.getContent)

0 commit comments

Comments
 (0)