Page tree

Versions Compared

Key

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

...

How to use configuring object: add Add script , and set initializing config

설정 객체 사용방법: 스크립트 추가, 에디터 초기화 config를 설정합니다.

Code Block
languagejs
themeEmacs
<!DOCTYPE html>
<html lang="ko">
    <script src='synapeditor.config.js'></script>
    <script>
        function initEditor() {
            new SynapEditor('synapEditor', synapEditorConfig);
        }
    </script>
    <body onload="initEditor();">
        <div id="synapEditor"></div>
    </body>
</html>

The following script is the Synap Editor Basic configuration objective.  사이냅 에디터 기본 설정 객체 입니다object.


It is set in the form of key and value, and operates as the default setting when removing unused settings are removed.

key, value 형태로 설정하며, 사용하지 않는 설정 제거시 기본설정으로 동작합니다.

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']
}


Setting

...

License

Set the path of the license file or designate the license object for the license file .

The 'editor.license' setting is required, and the editor Editor will not work if it is not set.

...

Code Block
languagejs
themeEmacs
titlesynapeditor.config.js
{
    'editor.license': {
        'company': 'SynapSoft',
        'key': [
            'licenseKey'
        ]
    }
}


Sample

...

Initialization Result

If the parameters above are usedapplied, the Editor will look like this:

...