anki/ts/editor-toolbar/format.ts

46 lines
1.1 KiB
TypeScript
Raw Normal View History

2021-03-29 21:05:30 +02:00
// @ts-ignore
import CommandIconButton from "./CommandIconButton.svelte";
2021-03-29 21:05:30 +02:00
import boldIcon from "./type-bold.svg";
import italicIcon from "./type-italic.svg";
import underlineIcon from "./type-underline.svg";
import superscriptIcon from "./format-superscript.svg";
import subscriptIcon from "./format-subscript.svg";
import eraserIcon from "./eraser.svg";
export const boldButton = {
component: CommandIconButton,
icon: boldIcon,
command: "bold",
};
export const italicButton = {
component: CommandIconButton,
icon: italicIcon,
command: "italic",
};
export const underlineButton = {
component: CommandIconButton,
icon: underlineIcon,
command: "underline",
};
export const superscriptButton = {
component: CommandIconButton,
icon: superscriptIcon,
command: "superscript",
};
export const subscriptButton = {
component: CommandIconButton,
icon: subscriptIcon,
command: "subscript",
};
export const eraserButton = {
component: CommandIconButton,
icon: eraserIcon,
command: "removeFormat",
highlightable: false,
};