@anthony809/svelte-editor

0.0.4 • Public • Published

A Svelte editor powered by EditorJS.

Install Svelte Editor

npm install @anthony809/svelte-editor

Import Editor

import Editor from "@anthony809/svelte-editor/Editor.svelte";

How to use

Simple, add the Editor component from @anthony809/svelte-editor/Editor.svelte to your svelte pages.

<script lang="ts">
    import Editor from "@anthony809/svelte-editor/Editor.svelte";
    let Editor:any
</script>

<EditorJs bind:data={editorJsData} />

Bind data from Editor to always have the latest data

<EditorJs bind:data={editorJsData} />

How to view data saved from Editor

<script lang="ts">
    import savedEditorData from "yourDataSource"
    // Import editor viewer
    import EditorViewer from "@anthony809/svelte-editor/Viewer.svelte";
</script>

<EditorViewer data={EditorViewer} />

More about EditorJS

Editor.js

/@anthony809/svelte-editor/

    Package Sidebar

    Install

    npm i @anthony809/svelte-editor

    Weekly Downloads

    7

    Version

    0.0.4

    License

    ISC

    Unpacked Size

    15.6 kB

    Total Files

    12

    Last publish

    Collaborators

    • anthony809