Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Code Block
languagexml
themeEmacs
titleHTML
linenumberstrue
<div style="background-color: #ffffff; width:100%; height:300px;">
        <div id="synapEditor"></div>
</div>

SynapEditor객체 생성시 synapEditorConfig 객체(synapeditor.config.js 파일에 정의되어 있습니다)를 넘겨줍니다.

...

languagejs
themeEmacs
titleJavascript (v2.2.0 이상)
linenumberstrue

...

체험하기

HTML
<!-- jQuery -->
<script src="https://code.jquery.com/jquery-3.3.1.js"></script>

<!-- code mirror -->
<script type="text/javascript" src='http://www.synapeditor.com/resource/synapeditor/externals/codemirror/codemirror.min.js'></script>
<script type="text/javascript" src="http://www.synapeditor.com/resource/synapeditor/externals/codemirror/xml.min.js"></script>
<link rel='stylesheet' href='http://www.synapeditor.com/resource/synapeditor/externals/codemirror/codemirror.min.css'>

<!-- formular parser -->
<script type="text/javascript" src='http://www.synapeditor.com/resource/synapeditor/externals/formula-parser/formula-parser.min.js'></script>


<!-- Synap Editor -->
<script src='http://www.synapeditor.com/resource/synapeditor.config.js'></script>
<script src='http://www.synapeditor.com/resource/synapeditor/synapeditor.min.js'></script>
<link href='http://www.synapeditor.com/resource/synapeditor/synapeditor.min.css' rel='stylesheet' type='text/css'>

<!-- tui Image Editor -->
<script type="text/javascript" src='http://www.synapeditor.com/resource/synapeditor/plugins/tuiImageEditor/tuiImageEditor.min.js'></script>
<link rel='stylesheet' href='http://www.synapeditor.com/resource/synapeditor/plugins/tuiImageEditor/tuiImageEditor.min.css'>
<div style="background-color: #ffffff; width:99%; height:300px;">
        <div id="synapEditor"></div>
</div>
<script>
		window.editor = new SynapEditor('synapEditor', synapEditorConfig);
</script>

...


설정하기

Code Block
languagejsxml
themeEmacs
titleJavascript (v2.1.0 이하)
linenumberstrue
<script<div src='http://www.synapeditor.com/resource/synapeditor/synapeditor.min.js'></script>
<script>
		window.editor =id='synapEditor'>
    Div와 같은 HTML Element를 이용하여 초기화한 사이냅에디터입니다.
</div>
 
<script>
    new SynapEditor('synapEditor', 'config.json');
</script>