jsdoc de una sola cosa

pull/2/head
Borja Robert 2 years ago
parent 94b24195bb
commit 9429ffb57c

@ -1,9 +1,8 @@
<script>
import {onMount} from 'svelte';
import { onMount } from 'svelte';
import { title, heading, subtitle, content, date, address } from '$lib/stores/store';
let editor;
/** @type {HTMLDivElement} */ let editor;
let innerHTML;
const handleSubmit = async () => {
@ -12,23 +11,21 @@
const getContent = () => {
if (!editor) {
console.log("no hay editor");
return
};
$content = editor.firstChild.innerHTML;
console.log('no hay editor');
return;
}
$content = editor.firstChild.innerHTML;
};
const quillOptions = {
modules: {
toolbar: [
['bold', 'italic'],
]
toolbar: [['bold', 'italic']]
},
theme: 'snow'
};
onMount(async () => {
const {default: Quill } = await import("quill");
const { default: Quill } = await import('quill');
let quill = new Quill(editor, {
modules: {
@ -38,7 +35,6 @@
placeholder: 'contenido'
});
});
</script>
<form on:submit|preventDefault={handleSubmit}>
@ -59,7 +55,8 @@
<div class="form-group">
<label for="content">Contenido</label>
<div id="editor" on:click={getContent}><div on:click={getContent} on:keyup={getContent} bind:this={editor} ></div>
<div id="editor" on:click={getContent}>
<div on:click={getContent} on:keyup={getContent} bind:this={editor} />
</div>
<div class="form-group">
@ -71,6 +68,7 @@
<label for="address">Dirección</label>
<input bind:value={$address} type="text" name="address" />
</div>
</div>
</form>
<style>

Loading…
Cancel
Save