1 import {EditorButton} from "./framework/buttons";
3 blockquote, bold, bulletList, clearFormating, code,
4 dangerCallout, details,
5 h2, h3, h4, h5, highlightColor, image,
6 infoCallout, italic, link, numberList, paragraph,
7 redo, source, strikethrough, subscript,
8 successCallout, superscript, table, taskList, textColor, underline,
11 } from "./defaults/button-definitions";
12 import {EditorContainerUiElement, EditorSimpleClassContainer} from "./framework/core";
13 import {el} from "../helpers";
14 import {EditorFormatMenu} from "./framework/blocks/format-menu";
15 import {FormatPreviewButton} from "./framework/blocks/format-preview-button";
16 import {EditorDropdownButton} from "./framework/blocks/dropdown-button";
17 import {EditorColorPicker} from "./framework/blocks/color-picker";
18 import {EditorTableCreator} from "./framework/blocks/table-creator";
19 import {EditorColorButton} from "./framework/blocks/color-button";
21 export function getMainEditorFullToolbar(): EditorContainerUiElement {
22 return new EditorSimpleClassContainer('editor-toolbar-main', [
24 new EditorButton(undo),
25 new EditorButton(redo),
28 new EditorFormatMenu([
29 new FormatPreviewButton(el('h2'), h2),
30 new FormatPreviewButton(el('h3'), h3),
31 new FormatPreviewButton(el('h4'), h4),
32 new FormatPreviewButton(el('h5'), h5),
33 new FormatPreviewButton(el('blockquote'), blockquote),
34 new FormatPreviewButton(el('p'), paragraph),
35 new FormatPreviewButton(el('p', {class: 'callout info'}), infoCallout),
36 new FormatPreviewButton(el('p', {class: 'callout success'}), successCallout),
37 new FormatPreviewButton(el('p', {class: 'callout warning'}), warningCallout),
38 new FormatPreviewButton(el('p', {class: 'callout danger'}), dangerCallout),
42 new EditorButton(bold),
43 new EditorButton(italic),
44 new EditorButton(underline),
45 new EditorDropdownButton(new EditorColorButton(textColor, 'color'), [
46 new EditorColorPicker('color'),
48 new EditorDropdownButton(new EditorColorButton(highlightColor, 'background-color'), [
49 new EditorColorPicker('background-color'),
51 new EditorButton(strikethrough),
52 new EditorButton(superscript),
53 new EditorButton(subscript),
54 new EditorButton(code),
55 new EditorButton(clearFormating),
58 new EditorButton(bulletList),
59 new EditorButton(numberList),
60 new EditorButton(taskList),
63 new EditorButton(link),
64 new EditorDropdownButton(table, [
65 new EditorTableCreator(),
67 new EditorButton(image),
68 new EditorButton(details),
71 new EditorButton(source),