Move strikethrough back to pop up menu. Minor corrections.
This commit is contained in:
parent
86b88d73dd
commit
dccad779fc
@ -9,14 +9,6 @@ api.onToolbarCreate(toolbar => {
|
||||
perform: e => e.applySurround('[u]', '[/u]', 'underline_text')
|
||||
});
|
||||
});
|
||||
api.onToolbarCreate(toolbar => {
|
||||
toolbar.addButton({
|
||||
id: "strikethrough_button",
|
||||
group: "fontStyles",
|
||||
icon: "strikethrough",
|
||||
perform: e => e.applySurround('<s>', '</s>', 'strikethrough_text')
|
||||
});
|
||||
});
|
||||
api.onToolbarCreate(toolbar => {
|
||||
toolbar.addButton({
|
||||
id: "align_center_button",
|
||||
@ -43,6 +35,13 @@ api.onToolbarCreate(toolbar => {
|
||||
});
|
||||
|
||||
// EXTRAS
|
||||
api.addToolbarPopupMenuOptionsCallback(() => {
|
||||
return {
|
||||
action: "strikethrough",
|
||||
icon: "strikethrough",
|
||||
label: "strikethrough_button"
|
||||
};
|
||||
});
|
||||
api.addToolbarPopupMenuOptionsCallback(() => {
|
||||
return {
|
||||
action: "floatleft",
|
||||
@ -71,8 +70,12 @@ api.addToolbarPopupMenuOptionsCallback(() => {
|
||||
label: "subscript_button"
|
||||
};
|
||||
});
|
||||
|
||||
api.modifyClass("controller:composer", {
|
||||
actions: {
|
||||
strikethrough() {
|
||||
this.get("toolbarEvent").applySurround("<s>", "</s>", "strikethrough_prompt");
|
||||
},
|
||||
floatleft() {
|
||||
this.get("toolbarEvent").applySurround('[wrap="floatl"]\n', '\n[/wrap]', "float_left_text");
|
||||
},
|
||||
@ -83,7 +86,7 @@ api.modifyClass("controller:composer", {
|
||||
this.get("toolbarEvent").applySurround("<sup>", "</sub>", "superscript_text");
|
||||
},
|
||||
subscript() {
|
||||
this.get("toolbarEvent").applySurround("<sub>", "</sub>", "suvscript_text");
|
||||
this.get("toolbarEvent").applySurround("<sub>", "</sub>", "subscript_text");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -67,7 +67,7 @@ columns_button:
|
||||
description:
|
||||
en: Enter the text for the title of the button in the composer.
|
||||
columns_text:
|
||||
default: "Use the closing tag to mark where the column ends."
|
||||
default: "Use the closing tag to mark where the column ends. Once done. Columns must be equal height."
|
||||
description:
|
||||
en: Enter the placeholder text that appears in the composer after the user clicks the button.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user