trix
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
import "trix/dist/trix.css"
|
||||
|
||||
export let value = "";
|
||||
export let field;
|
||||
let editor;
|
||||
|
||||
|
||||
@@ -28,9 +29,9 @@
|
||||
e.preventDefault();
|
||||
})
|
||||
})
|
||||
onDestroy(() => {
|
||||
editor.removeEventListener("trix-before-initialize")
|
||||
})
|
||||
// onDestroy(() => {
|
||||
// editor.removeEventListener("trix-before-initialize")
|
||||
// })
|
||||
|
||||
|
||||
Trix.config.blockAttributes.default.breakOnReturn = false
|
||||
@@ -39,11 +40,11 @@
|
||||
</script>
|
||||
|
||||
<div class="tox-wrapper">
|
||||
<input id="x" {value} type="hidden">
|
||||
<input id="x-{field.name}" {value} type="hidden">
|
||||
<trix-editor
|
||||
bind:this={editor}
|
||||
class=" content"
|
||||
input="x"
|
||||
input="x-{field.name}"
|
||||
role="textbox"
|
||||
tabindex="0"
|
||||
on:trix-change={updateValue}
|
||||
|
||||
@@ -26,9 +26,8 @@
|
||||
|
||||
<div class="mb-0">
|
||||
|
||||
<Trix bind:this={editor} bind:value></Trix>
|
||||
<Trix {field} bind:this={editor} bind:value></Trix>
|
||||
<!-- <Tinymce bind:this={editor} bind:value {additionalConfig}/>-->
|
||||
<!-- <TipTap bind:value bind:this={editor} />-->
|
||||
{#if field.collections.length > 0}
|
||||
<RichEditorFiles
|
||||
bind:graph
|
||||
|
||||
Reference in New Issue
Block a user