From c521c18da4481bf7abb2f2d91e17a4933180914a Mon Sep 17 00:00:00 2001 From: "iunctis.fr" Date: Mon, 10 Aug 2020 15:26:49 +0200 Subject: [PATCH] Update head_tag.html --- mobile/head_tag.html | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/mobile/head_tag.html b/mobile/head_tag.html index 15d015b..6daca3f 100644 --- a/mobile/head_tag.html +++ b/mobile/head_tag.html @@ -61,18 +61,26 @@ api.addToolbarPopupMenuOptionsCallback(() => { }; }); +api.addToolbarPopupMenuOptionsCallback(() => { + return { + action: "bbcodecolor", + icon: "palette", + label: "bbcode_color_button" + }; +}); + api.modifyClass("controller:composer", { actions: { strikethrough() { this.get("toolbarEvent").applySurround("", "", "strikethrough_text"); }, - superscript() { + superscript() { this.get("toolbarEvent").applySurround("", "", "superscript_text"); }, subscript() { this.get("toolbarEvent").applySurround("", "", "subscript_text"); }, - aligncenter() { + aligncenter() { this.get("toolbarEvent").applySurround('[wrap="center"]\n', '\n[/wrap]', "align_center_text"); }, alignright() { @@ -84,6 +92,9 @@ api.modifyClass("controller:composer", { floatleft() { this.get("toolbarEvent").applySurround('[wrap="floatl"]\n', '\n[/wrap]', "float_left_text"); } + bbcodecolor() { + this.get("toolbarEvent").applySurround('[color=#222]', '[/color]', bbcode_color_text"); + } } }); @@ -131,5 +142,9 @@ translations.composer.columns_text = translations.float_left_button = settings.float_left_button; translations.composer.float_left_text = settings.float_left_text; + +translations.bbcode_color_button = settings.bbcode_color_button; +translations.composer.bbcode_color_text = + settings.bbcode_color_text;