* Api: Add table button into html editor's toolbar

This commit is contained in:
Hadi Nategh 2020-10-14 11:05:51 +02:00
parent b42a4c097b
commit 612889c3c7
5 changed files with 19 additions and 8 deletions

View File

@ -450,21 +450,21 @@ var et2_htmlarea = /** @class */ (function (_super) {
*/
et2_htmlarea.TOOLBAR_SIMPLE = "undo redo|formatselect fontselect fontsizeselect | bold italic removeformat forecolor backcolor | " +
"alignleft aligncenter alignright alignjustify | numlist " +
"bullist outdent indent| link image pastetext";
"bullist outdent indent| link image pastetext | table";
/**
* arranged toolbars as extended mode
* @constant
*/
et2_htmlarea.TOOLBAR_EXTENDED = "fontselect fontsizeselect | bold italic strikethrough forecolor backcolor | " +
"link | alignleft aligncenter alignright alignjustify | numlist " +
"bullist outdent indent | removeformat | image | fullscreen";
"bullist outdent indent | removeformat | image | fullscreen | table";
/**
* arranged toolbars as advanced mode
* @constant
*/
et2_htmlarea.TOOLBAR_ADVANCED = "undo redo| formatselect | fontselect fontsizeselect | bold italic strikethrough forecolor backcolor | " +
"alignleft aligncenter alignright alignjustify | numlist " +
"bullist outdent indent ltr rtl | removeformat code| link image pastetext | searchreplace | fullscreen";
"bullist outdent indent ltr rtl | removeformat code| link image pastetext | searchreplace | fullscreen | table";
/**
* font size formats
* @constant

View File

@ -114,7 +114,7 @@ export class et2_htmlarea extends et2_editableWidget implements et2_IResizeable
*/
public static readonly TOOLBAR_SIMPLE : string = "undo redo|formatselect fontselect fontsizeselect | bold italic removeformat forecolor backcolor | "+
"alignleft aligncenter alignright alignjustify | numlist "+
"bullist outdent indent| link image pastetext";
"bullist outdent indent| link image pastetext | table";
/**
* arranged toolbars as extended mode
@ -122,7 +122,7 @@ export class et2_htmlarea extends et2_editableWidget implements et2_IResizeable
*/
public static readonly TOOLBAR_EXTENDED : string = "fontselect fontsizeselect | bold italic strikethrough forecolor backcolor | "+
"link | alignleft aligncenter alignright alignjustify | numlist "+
"bullist outdent indent | removeformat | image | fullscreen";
"bullist outdent indent | removeformat | image | fullscreen | table";
/**
* arranged toolbars as advanced mode
@ -130,7 +130,7 @@ export class et2_htmlarea extends et2_editableWidget implements et2_IResizeable
*/
public static readonly TOOLBAR_ADVANCED : string = "undo redo| formatselect | fontselect fontsizeselect | bold italic strikethrough forecolor backcolor | "+
"alignleft aligncenter alignright alignjustify | numlist "+
"bullist outdent indent ltr rtl | removeformat code| link image pastetext | searchreplace | fullscreen";
"bullist outdent indent ltr rtl | removeformat code| link image pastetext | searchreplace | fullscreen | table";
/**
* font size formats

View File

@ -86,7 +86,7 @@ class HtmlArea extends Etemplate\Widget
'undo', 'redo', 'bold', 'italic', 'strikethrough', 'forecolor', 'backcolor',
'link', 'alignleft', 'aligncenter', 'alignright', 'alignjustify',
'numlist', 'bullist', 'outdent', 'indent', 'ltr', 'rtl','pastetext',
'removeformat', 'code', 'image', 'searchreplace','formatselect', 'fontselect', 'fontsizeselect', 'fullscreen'
'removeformat', 'code', 'image', 'searchreplace','formatselect', 'fontselect', 'fontsizeselect', 'fullscreen', 'table'
];
/**
@ -97,7 +97,7 @@ class HtmlArea extends Etemplate\Widget
'undo', 'redo','formatselect', 'fontselect', 'fontsizeselect',
'bold' ,'italic', 'removeformat', 'forecolor', 'backcolor', 'alignleft',
'aligncenter', 'alignright', 'alignjustify', 'numlist', 'bullist', 'outdent',
'indent', 'link', 'image', 'pastetext'
'indent', 'link', 'image', 'pastetext', 'table'
];
/**

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 51.2 (57519) - http://www.bohemiancoding.com/sketch -->
<title>icon-paste-text</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M18,9 L18,5 L16,5 L16,6 C16,6.55228475 15.5522847,7 15,7 L9,7 C8.44771525,7 8,6.55228475 8,6 L8,5 L6,5 L6,18 L9,18 L9,9 L18,9 Z M9,20 L6,20 C4.9,20 4,19.1 4,18 L4,5 C4,3.9 4.9,3 6,3 L9.18,3 C9.6,1.84 10.7,1 12,1 C13.3,1 14.4,1.84 14.82,3 L18,3 C19.1,3 20,3.9 20,5 L20,9 L21,9 L21,21 L9,21 L9,20 Z M10.5,10.5 L10.5,19.5 L19.5,19.5 L19.5,10.5 L10.5,10.5 Z M12,3 C11.45,3 11,3.45 11,4 C11,4.55 11.45,5 12,5 C12.55,5 13,4.55 13,4 C13,3.45 12.55,3 12,3 Z M12,12 L18,12 L18,14 L17.5,14 L17,13 L16,13 L16,17 L16.75,17 L16.75,18 L13.25,18 L13.25,17 L14,17 L14,13 L13,13 L12.5,14 L12,14 L12,12 Z" fill="#000000" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g id="table" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><path id="Shape" fill="#000" fill-rule="nonzero" d="M19,4 C20.1045695,4 21,4.8954305 21,6 L21,18 C21,19.1045695 20.1045695,20 19,20 L5,20 C3.8954305,20 3,19.1045695 3,18 L3,6 C3,4.8954305 3.8954305,4 5,4 L19,4 Z M5,14 L5,18 L11,18 L11,14 L5,14 Z M19,14 L13,14 L13,18 L19,18 L19,14 Z M19,8 L13,8 L13,12 L19,12 L19,8 Z M5,12 L11,12 L11,8 L5,8 L5,12 Z"/></g></svg>

After

Width:  |  Height:  |  Size: 521 B