diff --git a/packages/text-editor/src/components/CollaboratorEditor.svelte b/packages/text-editor/src/components/CollaboratorEditor.svelte index e37f33d7739..b540ca96f64 100644 --- a/packages/text-editor/src/components/CollaboratorEditor.svelte +++ b/packages/text-editor/src/components/CollaboratorEditor.svelte @@ -65,6 +65,7 @@ export let documentId: string export let readonly = false + export let visible = true export let token: string export let collaboratorURL: string @@ -129,8 +130,10 @@ editor.commands.toggleStrike() } - export function getHTML (): string { - return editor.getHTML() + export function getHTML (): string | undefined { + if (editor) { + return editor.getHTML() + } } export function getLink () { @@ -466,144 +469,146 @@ let showDiff = true -
- {#if isFormatting && !readonly} -
-
- - - - - - -
- - -
- -
- - +{#if visible} +
+ {#if isFormatting && !readonly} +
+
+ - - {#if activeModes.has('table')} - {/if} -
-
- {#if comparedVersion !== undefined} -
{ - showDiff = !showDiff - editor.chain().focus() - }} + selected={activeModes.has('italic')} + showTooltip={{ label: textEditorPlugin.string.Italic }} + on:click={getToggler(toggleItalic)} /> - -
- {:else} -
- + + +
+ + +
+ +
+ + + + + {#if activeModes.has('table')} + + {/if}
- {/if} -
- {:else if comparedVersion !== undefined} -
- { - showDiff = !showDiff - editor.chain().focus() - }} - /> - +
+ {#if comparedVersion !== undefined} +
+ { + showDiff = !showDiff + editor.chain().focus() + }} + /> + +
+ {:else} +
+ +
+ {/if} +
+ {:else if comparedVersion !== undefined} +
+ { + showDiff = !showDiff + editor.chain().focus() + }} + /> + +
+ {/if} +
+
- {/if} -
-
-
+{/if}