Page tree

Versions Compared

Key

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

...

PreferenceTypeDescriptionPreference Definition
buttonDefArray | Object

buttonDef to add button to toolbar or menu.

Array Form

Code Block
languagejs
themeEmacs
buttonDef: [{
	name: 'Name of the button', //This is a requirement when there are 2 or more buttons. If you want to add them to UI, use names of each button.
	label: 'Text to be displayed on the button.',
	iconSVG: 'SVG tag to be used as the icon of the button',
	onClickFunc: function () {
		//Function to be executed when the button is clicked.
	}
}, ...]

Object Form

Code Block
languagejs
themeEmacs
buttonDef: {
	name: 'Name of the button', //It is not a requirement when there is only one button. Use the name of the plugin if you want to add it to UI.
	label: 'Text to be displayed on the button.',
	iconSVG: 'SVG tag to be used as the icon of the button',
	onClickFunc: function () {
		//Function to be executed when the button is clicked.
	}
}


shortcutDefArray | Object

shortcutDef to add a shortcut.

  • Key available for creating a shortcut.
    • Backspace
    • Tab
    • Enter
    • Esc
    • Space
    • PageUp
    • PageDown
    • End
    • Home
    • Left
    • Up
    • Right
    • Down
    • Insert
    • Delete
    • Cmd (for mac)
    • 0~9
    • A~Z
    • F1~F12
    • ;
    • +
    • ,
    • -
    • .
    • /
    • `
    • [
    • \
    • ]
    • '
  • How to create a shortcut
    • You may connect multiple keys with +.
    • Ex)
      • 'Ctrl+A'
      • 'Cmd+Backspace'

Array 형태Form

Code Block
languagejs
themeEmacs
shortcutDef: [{
	key: {
		windows: 'Shortcut for Windows',
		mac: 'Shortcut for mac'
	},
	option: {
		action: 'Name of Editor action', 
		params: ['Editor action parameter 1', ...],
		focusIme: true or false //Focus onto the Editor after executing the shortcut
	}
}, ...]

Object 형태Form

Code Block
languagejs
themeEmacs
shortcutDef: {
	key: {
		windows: 'Shortcut for Windows',
		mac: 'Shortcut for mac'
	},
	option: {
		action: 'Name of Editor action', 
		params: ['Editor action parameter 1', ...],
		focusIme: true or false //Focus onto the Editor after executing the shortcut
	}
}


...