More work on the new rich text editor. It may have a few bugs still.

This commit is contained in:
Scott Idem
2024-12-02 19:24:00 -05:00
parent 44907bc01f
commit c6631e221c
3 changed files with 26 additions and 310 deletions

View File

@@ -20,7 +20,7 @@
import Align from './icons/textalign.svelte';
import Quickcolor from './icons/quickcolor.svelte';
import Table from './icons/table.svelte';
import Image from './icons/image.svelte';
// import Image from './icons/image.svelte';
import Text from './icons/text.svelte';
import SearchReplace from './icons/search-replace.svelte';
@@ -35,15 +35,15 @@ let { editor, show_button_kv }: Props = $props();
let show_button_kv_defaults: any = {
undo: true,
redo: false,
redo: true,
text: true,
bold: true,
italic: true,
underline: true,
strikethrough: true,
align: true,
strikethrough: false,
align: false,
link: true,
code: false,
blockquote: false,
@@ -57,7 +57,7 @@ let show_button_kv_defaults: any = {
text_color: true,
highlighter: true,
quick_color: true,
search_replace: true,
search_replace: false,
};
if (show_button_kv) {
show_button_kv = {...show_button_kv_defaults, ...show_button_kv};
@@ -116,9 +116,9 @@ if (show_button_kv) {
{#if show_button_kv.task_list}
<TaskList {editor} />
{/if}
{#if show_button_kv.image}
<!-- {#if show_button_kv.image}
<Image {editor} />
{/if}
{/if} -->
{#if show_button_kv.table}
<Table {editor} />
{/if}