diff --git a/ts/editor-toolbar/ColorPicker.svelte b/ts/editor-toolbar/ColorPicker.svelte index 7e0358574..c53dbb24b 100644 --- a/ts/editor-toolbar/ColorPicker.svelte +++ b/ts/editor-toolbar/ColorPicker.svelte @@ -37,6 +37,6 @@ } - diff --git a/ts/editor-toolbar/DropdownIconButton.svelte b/ts/editor-toolbar/DropdownIconButton.svelte new file mode 100644 index 000000000..f03a8dce8 --- /dev/null +++ b/ts/editor-toolbar/DropdownIconButton.svelte @@ -0,0 +1,25 @@ + + + diff --git a/ts/editor-toolbar/DropdownItem.svelte b/ts/editor-toolbar/DropdownItem.svelte new file mode 100644 index 000000000..4ea91de2f --- /dev/null +++ b/ts/editor-toolbar/DropdownItem.svelte @@ -0,0 +1,14 @@ + + +
  • + +
  • diff --git a/ts/editor-toolbar/EditorToolbar.svelte b/ts/editor-toolbar/EditorToolbar.svelte index 4fef8b702..5336136b2 100644 --- a/ts/editor-toolbar/EditorToolbar.svelte +++ b/ts/editor-toolbar/EditorToolbar.svelte @@ -1,4 +1,5 @@ -
    + + +
    + diff --git a/ts/editor-toolbar/index.ts b/ts/editor-toolbar/index.ts index 71f65f0d3..dff93d5c0 100644 --- a/ts/editor-toolbar/index.ts +++ b/ts/editor-toolbar/index.ts @@ -6,6 +6,7 @@ import { setupI18n, ModuleName } from "anki/i18n"; import EditorToolbarSvelte from "./EditorToolbar.svelte"; import LabelButton from "./LabelButton.svelte"; +import DropdownIconButton from "./DropdownIconButton.svelte"; // @ts-ignore export { updateActiveButtons, clearActiveButtons } from "./CommandIconButton.svelte"; @@ -45,6 +46,8 @@ const defaultButtons = [ ], [forecolorButton, colorpickerButton], [attachmentButton, recordButton, clozeButton, mathjaxButton, htmlButton], + [ { component: DropdownIconButton }], + ]; class EditorToolbar extends HTMLElement {