From 89507d1f2b307cae3a143ec887576841b9d4a31d Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 6 Dec 2021 10:14:37 +0100 Subject: [PATCH] Add underline button into html editor's toolbar --- api/js/etemplate/et2_widget_htmlarea.ts | 6 +++--- api/src/Etemplate/Widget/HtmlArea.php | 4 ++-- api/templates/default/images/htmlarea/underline.svg | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 api/templates/default/images/htmlarea/underline.svg diff --git a/api/js/etemplate/et2_widget_htmlarea.ts b/api/js/etemplate/et2_widget_htmlarea.ts index c8ce495203..b7b54b224e 100644 --- a/api/js/etemplate/et2_widget_htmlarea.ts +++ b/api/js/etemplate/et2_widget_htmlarea.ts @@ -112,7 +112,7 @@ export class et2_htmlarea extends et2_editableWidget implements et2_IResizeable * arranged toolbars as simple mode * @constant */ - public static readonly TOOLBAR_SIMPLE : string = "undo redo|formatselect fontselect fontsizeselect | bold italic removeformat forecolor backcolor | "+ + public static readonly TOOLBAR_SIMPLE : string = "undo redo|formatselect fontselect fontsizeselect | bold italic underline removeformat forecolor backcolor | "+ "alignleft aligncenter alignright alignjustify | bullist "+ "numlist outdent indent| link image pastetext | table"; @@ -120,7 +120,7 @@ export class et2_htmlarea extends et2_editableWidget implements et2_IResizeable * arranged toolbars as extended mode * @constant */ - public static readonly TOOLBAR_EXTENDED : string = "fontselect fontsizeselect | bold italic strikethrough forecolor backcolor | "+ + public static readonly TOOLBAR_EXTENDED : string = "fontselect fontsizeselect | bold italic underline strikethrough forecolor backcolor | "+ "link | alignleft aligncenter alignright alignjustify | numlist "+ "bullist outdent indent | removeformat | image | fullscreen | table"; @@ -128,7 +128,7 @@ export class et2_htmlarea extends et2_editableWidget implements et2_IResizeable * arranged toolbars as advanced mode * @constant */ - public static readonly TOOLBAR_ADVANCED : string = "undo redo| formatselect | fontselect fontsizeselect | bold italic strikethrough forecolor backcolor | "+ + public static readonly TOOLBAR_ADVANCED : string = "undo redo| formatselect | fontselect fontsizeselect | bold italic underline strikethrough forecolor backcolor | "+ "alignleft aligncenter alignright alignjustify | bullist "+ "numlist outdent indent ltr rtl | removeformat code| link image pastetext | searchreplace | fullscreen | table"; diff --git a/api/src/Etemplate/Widget/HtmlArea.php b/api/src/Etemplate/Widget/HtmlArea.php index e9c921ecc3..a058ec3d83 100644 --- a/api/src/Etemplate/Widget/HtmlArea.php +++ b/api/src/Etemplate/Widget/HtmlArea.php @@ -84,7 +84,7 @@ class HtmlArea extends Etemplate\Widget * @var array */ public static $toolbar_list = [ - 'undo', 'redo', 'bold', 'italic', 'strikethrough', 'forecolor', 'backcolor', + 'undo', 'redo', 'bold', 'italic', 'underline', 'strikethrough', 'forecolor', 'backcolor', 'link', 'alignleft', 'aligncenter', 'alignright', 'alignjustify', 'numlist', 'bullist', 'outdent', 'indent', 'ltr', 'rtl','pastetext', 'removeformat', 'code', 'image', 'searchreplace','formatselect', 'fontselect', 'fontsizeselect', 'fullscreen', 'table' @@ -96,7 +96,7 @@ class HtmlArea extends Etemplate\Widget */ public static $toolbar_default_list = [ 'undo', 'redo','formatselect', 'fontselect', 'fontsizeselect', - 'bold' ,'italic', 'removeformat', 'forecolor', 'backcolor', 'alignleft', + 'bold' ,'italic', 'underline', 'removeformat', 'forecolor', 'backcolor', 'alignleft', 'aligncenter', 'alignright', 'alignjustify', 'numlist', 'bullist', 'outdent', 'indent', 'link', 'image', 'pastetext', 'table' ]; diff --git a/api/templates/default/images/htmlarea/underline.svg b/api/templates/default/images/htmlarea/underline.svg new file mode 100644 index 0000000000..851029c82d --- /dev/null +++ b/api/templates/default/images/htmlarea/underline.svg @@ -0,0 +1 @@ + \ No newline at end of file