() => { return { name: 'ExamplePlugin', Constructor: function( { app, createButton, createToggle, getPluginStore, setPluginStore, addSettingsItem, onYarnLoadedData, onYarnEditorOpen, onYarnInPreviewMode, onYarnSavedNode, onYarnSetLanguage, onYarnLoadedStateFromLocalStorage, onYarnSavedStateToLocalStorage, onYarnSetDocumentType, onKeyUp, onKeyDown, onLoad, }) { const self = this; this.name = 'ExamplePlugin'; this.onOpenPluginEditor = ()=> { alert("YAY!") } createButton(self.name, { name: 'ExamplePlugin', className: 'item', attachTo: 'fileMenuDropdown', onClick: 'onOpenPluginEditor()', iconName: 'cog', }); } } }