RELEASE 2.7.0 OR ABOVE
Add a message resource to be used in the editor.
If there is a message with the same key, it is overwritten..
Parameters:
Name | Type | Description |
---|---|---|
language | String | The language in which to add the message. ('ko', 'en', ... ) |
messages | Object | key: Message key, value: Message details |
Example:
var koMessages = { 'myPlugin.message.synap': '사이냅', 'myPlugin.message.editor': '에디터' }; var enMessages = { 'myPlugin.message.synap': 'Synap', 'myPlugin.message.editor': 'Editor' }; SynapEditor.addMessages('ko', koMessages); SynapEditor.addMessages('en', enMessages);
Experiencing
RELEASE 2.7.0 OR ABOVE
You can add a new message to Synap Editor, or change a message that has already been set.
Related API
Changing the default message
- You can add new messages or change the default messages using the SynapEditor.addMessages(language, Object) API.
- (It should be set before creating Synap Editor as new.)
<script> var changedMessages = { 'message.label.bold': '★Bold★', // Bold -> ★Bold★ 'message.label.italic': '♧Italic♧' // Italic -> ♧Italic♧ }; SynapEditor.addMessages('en', changedMessages); // Changing the default message window.editor = new SynapEditor('synapEditor', synapEditorConfig); // Create Synap Editor after setting. </script>