diff --git a/.discourse-compatibility b/.discourse-compatibility new file mode 100644 index 0000000..7c5bc79 --- /dev/null +++ b/.discourse-compatibility @@ -0,0 +1 @@ +< 3.2.0.beta2: 1cc5d51137652c3977640f064739a08b1d1fe1be \ No newline at end of file diff --git a/desktop/head_tag.html b/desktop/head_tag.html index 013c7df..3697360 100644 --- a/desktop/head_tag.html +++ b/desktop/head_tag.html @@ -59,31 +59,20 @@ api.onToolbarCreate(toolbar => { }); // EXTRAS -api.addToolbarPopupMenuOptionsCallback(() => { - return { - action: "floatleft", - icon: "indent", - label: "float_left_button" - }; -}); -api.addToolbarPopupMenuOptionsCallback(() => { - return { - action: "columns", - icon: "columns", - label: "columns_button" - }; +api.addComposerToolbarPopupMenuOption({ + action: (toolbarEvent) => { + toolbarEvent.applySurround('[wrap="floatl"]\n', '\n[/wrap]', "float_left_text"); + }, + icon: 'indent', + label: 'float_left_button', }); -api.modifyClass("controller:composer", { - pluginId: 'md-composer-extras', - actions: { - floatleft() { - this.get("toolbarEvent").applySurround('[wrap="floatl"]\n', '\n[/wrap]', "float_left_text"); - }, - columns() { - this.get("toolbarEvent").applySurround('[wrap="columns"]\n', '\n[/wrap]', "columns_text"); - } - } +api.addComposerToolbarPopupMenuOption({ + action: (toolbarEvent) => { + toolbarEvent.applySurround('[wrap="columns"]\n', '\n[/wrap]', "columns_text"); + }, + icon: 'columns', + label: 'columns_button', }); // TEXTS