1 import {EditorButton} from "./framework/buttons";
3 blockquote, bold, clearFormating, code,
4 dangerCallout, details,
5 h2, h3, h4, h5, highlightColor, image,
6 infoCallout, italic, link, paragraph,
7 redo, source, strikethrough, subscript,
8 successCallout, superscript, 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";
20 export function getMainEditorFullToolbar(): EditorContainerUiElement {
21 return new EditorSimpleClassContainer('editor-toolbar-main', [
23 new EditorButton(undo),
24 new EditorButton(redo),
27 new EditorFormatMenu([
28 new FormatPreviewButton(el('h2'), h2),
29 new FormatPreviewButton(el('h3'), h3),
30 new FormatPreviewButton(el('h4'), h4),
31 new FormatPreviewButton(el('h5'), h5),
32 new FormatPreviewButton(el('blockquote'), blockquote),
33 new FormatPreviewButton(el('p'), paragraph),
34 new FormatPreviewButton(el('p', {class: 'callout info'}), infoCallout),
35 new FormatPreviewButton(el('p', {class: 'callout success'}), successCallout),
36 new FormatPreviewButton(el('p', {class: 'callout warning'}), warningCallout),
37 new FormatPreviewButton(el('p', {class: 'callout danger'}), dangerCallout),
41 new EditorButton(bold),
42 new EditorButton(italic),
43 new EditorButton(underline),
44 new EditorDropdownButton(textColor, [
45 new EditorColorPicker('color'),
47 new EditorDropdownButton(highlightColor, [
48 new EditorColorPicker('background-color'),
50 new EditorButton(strikethrough),
51 new EditorButton(superscript),
52 new EditorButton(subscript),
53 new EditorButton(code),
54 new EditorButton(clearFormating),
57 new EditorButton(link),
58 new EditorButton(image),
59 new EditorButton(details),
62 new EditorButton(source),