Skip to content

How can I show Output JSON data on Editorjs again? #1592

@theaungmyatmoe

Description

@theaungmyatmoe

I am trying to show Editorjs Output json on Editorjs again.
I tried with render method , it is not working.

I want to show my JSON on Editorjs in edit mode.

Like this.

  <div id="editorjs">
    </div>

  <script src="{{ asset('js/app.js')}}"></script>
  <script>
    const editor = new EditorJS({
      editor.render(
blocks: [
        {
          type: "image",
          data: {
            url: "https://cdn.pixabay.com/photo/2017/09/01/21/53/blue-2705642_1280.jpg"
          }
        },
        {
          type: "header",
          data: {
             text: "New header",
             level: 2
          }
        }
      ]
    });
  }
     )
    </script>

And it should show like this.
Screenshot_2021-03-12-22-44-15-18

How should I render it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions