Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
themeEmacs
titlesynapeditor.config.js
var synapEditorConfig = {
	'editor.license': '/resource/license.json',
	'editor.size.width': '100%',
	'editor.size.height': '100%',
	'editor.lang.default': 'en',
	'editor.menu.show': false,
	'editor.toolbar': ['new','open','|', 'paragraphStyleWithText', '|', 'fontFamilyWithText', '|','fontSizeWithText', '|','bold', 'italic', 'underline', 'strike', '|','fontColor', 'fontBackgroundColor']
}


Textarea를 이용한 에디터 초기화

HTML의 textarea를 이용해서 에디터를 초기화 할 수 있습니다. 설정방법은 아래와 같습니다.

Code Block
languagexml
themeEmacs
linenumberstrue
<textarea id='synapEditor'>
	Textarea를 이용하여 초기화한 사이냅에디터입니다.
</textarea>

<script>
	new SynapEditor('synapEditor', synapEditorConfig, document.getElementById('synapEditor').value);
</script>

라이센스 설정

라이센스 파일의 경로 또는 라이센스 객체를 설정합니다.

...