2024-05-30 07:25:25 -04:00
|
|
|
import {EditorButton, FormatPreviewButton} from "./framework/buttons";
|
2024-05-29 15:38:31 -04:00
|
|
|
import {
|
|
|
|
blockquote, bold, code,
|
|
|
|
dangerCallout,
|
2024-06-05 13:43:42 -04:00
|
|
|
h2, h3, h4, h5, image,
|
2024-05-29 15:38:31 -04:00
|
|
|
infoCallout, italic, link, paragraph,
|
|
|
|
redo, strikethrough, subscript,
|
|
|
|
successCallout, superscript, underline,
|
|
|
|
undo,
|
|
|
|
warningCallout
|
|
|
|
} from "./defaults/button-definitions";
|
2024-05-30 07:25:25 -04:00
|
|
|
import {EditorContainerUiElement, EditorFormatMenu, EditorSimpleClassContainer} from "./framework/containers";
|
|
|
|
import {el} from "../helpers";
|
2024-05-29 15:38:31 -04:00
|
|
|
|
|
|
|
|
|
|
|
export function getMainEditorFullToolbar(): EditorContainerUiElement {
|
2024-05-30 07:25:25 -04:00
|
|
|
return new EditorSimpleClassContainer('editor-toolbar-main', [
|
2024-05-29 15:38:31 -04:00
|
|
|
new EditorButton(undo),
|
|
|
|
new EditorButton(redo),
|
|
|
|
|
|
|
|
new EditorFormatMenu([
|
2024-05-30 07:25:25 -04:00
|
|
|
new FormatPreviewButton(el('h2'), h2),
|
|
|
|
new FormatPreviewButton(el('h3'), h3),
|
|
|
|
new FormatPreviewButton(el('h4'), h4),
|
|
|
|
new FormatPreviewButton(el('h5'), h5),
|
|
|
|
new FormatPreviewButton(el('blockquote'), blockquote),
|
|
|
|
new FormatPreviewButton(el('p'), paragraph),
|
|
|
|
new FormatPreviewButton(el('p', {class: 'callout info'}), infoCallout),
|
|
|
|
new FormatPreviewButton(el('p', {class: 'callout success'}), successCallout),
|
|
|
|
new FormatPreviewButton(el('p', {class: 'callout warning'}), warningCallout),
|
|
|
|
new FormatPreviewButton(el('p', {class: 'callout danger'}), dangerCallout),
|
2024-05-29 15:38:31 -04:00
|
|
|
]),
|
|
|
|
|
|
|
|
new EditorButton(bold),
|
|
|
|
new EditorButton(italic),
|
|
|
|
new EditorButton(underline),
|
|
|
|
new EditorButton(strikethrough),
|
|
|
|
new EditorButton(superscript),
|
|
|
|
new EditorButton(subscript),
|
|
|
|
new EditorButton(code),
|
|
|
|
|
|
|
|
new EditorButton(link),
|
2024-06-05 13:43:42 -04:00
|
|
|
new EditorButton(image),
|
2024-05-29 15:38:31 -04:00
|
|
|
]);
|
|
|
|
}
|