Page tree
Skip to end of metadata
Go to start of metadata

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:

NameTypeDescription
languageStringThe language in which to add the message. ('ko', 'en', ... )
messagesObjectkey: 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('ko', changedMessages);  // Changing the default message
 
		window.editor = new SynapEditor('synapEditor', synapEditorConfig);  // Create Synap Editor after setting.
</script>



  • No labels