diff --git a/ftl/core/editing.ftl b/ftl/core/editing.ftl index b968bc8f0..4731a4937 100644 --- a/ftl/core/editing.ftl +++ b/ftl/core/editing.ftl @@ -1,8 +1,11 @@ editing-add-media = Add Media +editing-align-left = Align left +editing-align-right = Align right editing-an-error-occurred-while-opening = An error occurred while opening { $val } editing-attach-picturesaudiovideo-f3 = Attach pictures/audio/video (F3) editing-bold-text-ctrlandb = Bold text (Ctrl+B) editing-cards = Cards +editing-center = Center editing-change-colour-f8 = Change colour (F8) editing-cloze-deletion-ctrlandshiftandc = Cloze deletion (Ctrl+Shift+C) editing-couldnt-record-audio-have-you-installed = Couldn't record audio. Have you installed 'lame'? @@ -13,8 +16,10 @@ editing-edit-current = Edit Current editing-edit-html = Edit HTML editing-fields = Fields editing-html-editor = HTML Editor +editing-indent = Indent editing-italic-text-ctrlandi = Italic text (Ctrl+I) editing-jump-to-tags-with-ctrlandshiftandt = Jump to tags with Ctrl+Shift+T +editing-justify = Justify editing-latex = LaTeX editing-latex-equation = LaTeX equation editing-latex-math-env = LaTeX math env. @@ -22,6 +27,8 @@ editing-mathjax-block = MathJax block editing-mathjax-chemistry = MathJax chemistry editing-mathjax-inline = MathJax inline editing-media = Media +editing-ordered-list = Ordered list +editing-outdent = Outdent editing-paste = Paste editing-record-audio-f5 = Record audio (F5) editing-remove-formatting-ctrlandr = Remove formatting (Ctrl+R) @@ -32,4 +39,5 @@ editing-superscript-ctrlandand = Superscript (Ctrl++) editing-tags = Tags editing-to-make-a-cloze-deletion-on = To make a cloze deletion on an existing note, you need to change it to a cloze type first, via 'Notes>Change Note Type' editing-underline-text-ctrlandu = Underline text (Ctrl+U) +editing-unordered-list = Unordered list editing-warning-cloze-deletions-will-not-work = Warning, cloze deletions will not work until you switch the type at the top to Cloze. diff --git a/ts/editor-toolbar/BUILD.bazel b/ts/editor-toolbar/BUILD.bazel index 8d2b2cbc5..b8bf53313 100644 --- a/ts/editor-toolbar/BUILD.bazel +++ b/ts/editor-toolbar/BUILD.bazel @@ -67,6 +67,7 @@ ts_library( copy_bootstrap_icons( name = "bootstrap-icons", icons = [ + # inline formatting "type-bold.svg", "type-italic.svg", "type-underline.svg", @@ -74,6 +75,17 @@ copy_bootstrap_icons( "square-fill.svg", "paperclip.svg", "mic.svg", + + # block formatting + "list-ul.svg", + "list-ol.svg", + "text-paragraph.svg", + "justify.svg", + "text-left.svg", + "text-right.svg", + "text-center.svg", + "text-indent-left.svg", + "text-indent-right.svg", ], ) diff --git a/ts/editor-toolbar/ButtonDropdown.d.ts b/ts/editor-toolbar/ButtonDropdown.d.ts new file mode 100644 index 000000000..ad869013e --- /dev/null +++ b/ts/editor-toolbar/ButtonDropdown.d.ts @@ -0,0 +1,9 @@ +// Copyright: Ankitects Pty Ltd and contributors +// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html +import type { ToolbarItem } from "./types"; + +export interface ButtonDropdownProps { + id: string; + className?: string; + buttons: ToolbarItem[]; +} diff --git a/ts/editor-toolbar/ButtonDropdown.svelte b/ts/editor-toolbar/ButtonDropdown.svelte index fa1c5b26c..9d96d8654 100644 --- a/ts/editor-toolbar/ButtonDropdown.svelte +++ b/ts/editor-toolbar/ButtonDropdown.svelte @@ -10,10 +10,17 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html export let className = ""; function extendClassName(className: string): string { - return `dropdown-menu bg-transparent border-0 ${className}`; + return `dropdown-menu btn-dropdown-menu py-1 mb-0 ${className}`; } export let buttons: ToolbarItem[]; + + diff --git a/ts/editor-toolbar/ButtonGroup.svelte b/ts/editor-toolbar/ButtonGroup.svelte index 1e328e901..fc8130b7e 100644 --- a/ts/editor-toolbar/ButtonGroup.svelte +++ b/ts/editor-toolbar/ButtonGroup.svelte @@ -20,27 +20,25 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -