...
예제) 'Hello World~'를 에디터에 삽입하는 플러그인
PluginGenerator 정의
- PluginGenerator로 전달된 editor 인스턴스를 이용해 플러그인을 정의합니다.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<!-- synapeditor plugin --> <script type="text/javascript" src="./plugins/helloWorldInserter.js"></script> |
에디터 툴바 영역에 플러그인 버튼 달기
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
"editor.toolbar": ["bold", "italic", "underline", "strike", "helloWorldInserter"] //helloWorldInserter 플러그인을 툴바 영역에 설정합니다. |