Page tree

Versions Compared

Key

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

The initialization of the Initializing Synap Editor is as simple as shown the below.

Code Block
languagejs
themeEmacs
new SynapEditor('synapEditor');

Additional preferences can be specified set as an element when while creating the editor Editor object, or through a separate configuration file.

...

Configuration through Object Creation

Code Block
languagejs
themeEmacs
window.editor = new SynapEditor('synapEditor', {
	'editor.license': '/resource/license.json',
	'editor.toolbar': ['new','open','|', 'paragraphStyleWithText', '|', 'fontFamilyWithText', '|','fontSizeWithText', '|','bold', 'italic', 'underline', 'strike', '|','fontColor', 'fontBackgroundColor'],
	'editor.size.width': '100%',
	'editor.size.height': '100%',
	'editor.lang.default': 'en',
	'editor.menu.show': false
});

...


Configuration via Separate Config File

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

...


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

...