Update head_tag.html

This commit is contained in:
iunctis.fr 2020-08-10 15:26:49 +02:00 committed by GitHub
parent c5b28c8651
commit c521c18da4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,18 +61,26 @@ api.addToolbarPopupMenuOptionsCallback(() => {
}; };
}); });
api.addToolbarPopupMenuOptionsCallback(() => {
return {
action: "bbcodecolor",
icon: "palette",
label: "bbcode_color_button"
};
});
api.modifyClass("controller:composer", { api.modifyClass("controller:composer", {
actions: { actions: {
strikethrough() { strikethrough() {
this.get("toolbarEvent").applySurround("<s>", "</s>", "strikethrough_text"); this.get("toolbarEvent").applySurround("<s>", "</s>", "strikethrough_text");
}, },
superscript() { superscript() {
this.get("toolbarEvent").applySurround("<sup>", "</sub>", "superscript_text"); this.get("toolbarEvent").applySurround("<sup>", "</sub>", "superscript_text");
}, },
subscript() { subscript() {
this.get("toolbarEvent").applySurround("<sub>", "</sub>", "subscript_text"); this.get("toolbarEvent").applySurround("<sub>", "</sub>", "subscript_text");
}, },
aligncenter() { aligncenter() {
this.get("toolbarEvent").applySurround('[wrap="center"]\n', '\n[/wrap]', "align_center_text"); this.get("toolbarEvent").applySurround('[wrap="center"]\n', '\n[/wrap]', "align_center_text");
}, },
alignright() { alignright() {
@ -84,6 +92,9 @@ api.modifyClass("controller:composer", {
floatleft() { floatleft() {
this.get("toolbarEvent").applySurround('[wrap="floatl"]\n', '\n[/wrap]', "float_left_text"); this.get("toolbarEvent").applySurround('[wrap="floatl"]\n', '\n[/wrap]', "float_left_text");
} }
bbcodecolor() {
this.get("toolbarEvent").applySurround('[color=#222]', '[/color]', bbcode_color_text");
}
} }
}); });
@ -132,4 +143,8 @@ translations.float_left_button = settings.float_left_button;
translations.composer.float_left_text = translations.composer.float_left_text =
settings.float_left_text; settings.float_left_text;
translations.bbcode_color_button = settings.bbcode_color_button;
translations.composer.bbcode_color_text =
settings.bbcode_color_text;
</script> </script>