Create your own Notion like WYSIWYG editor with Editor.JS!!

Поділитися
Вставка
  • Опубліковано 27 січ 2025

КОМЕНТАРІ • 40

  • @sukritsaha5632
    @sukritsaha5632 Рік тому

    Even I am using Editor.JS in my project and it's brilliant. Ended up building custom renderers for almost all the tools and it looks perfect.

    • @livecode247
      @livecode247  11 місяців тому

      It is a pretty good setup and much lightweight compared to the ones which existed before. Obviously all have different use cases but yes

    • @sukritsaha5632
      @sukritsaha5632 11 місяців тому

      @@livecode247 Yeah, I agree

  • @angadsingh5636
    @angadsingh5636 5 місяців тому +1

    my goat, right when i needed to build an editor

  • @michaelyabut5969
    @michaelyabut5969 8 місяців тому +1

    thanks, this video helped a lot. all those dynamic imports were important

  • @mihiramin1091
    @mihiramin1091 Рік тому +2

    can I get the orginal code cause I tried a lot but I didn't even get up with running the Editor Js, let alone the further things in the video. Please can I get your original code and not some other reference code? please

  • @ebukaezeanya512
    @ebukaezeanya512 Рік тому +1

    The part where you have to destroy the ref i dont get it. I'm trying to follow along using typescript and when i create my editor component and i call it... It renders it like 4 times and when i try to add the line where you destroy the ref.current my code breaks

  • @LightMonkeyBrother
    @LightMonkeyBrother 2 місяці тому

    how to change text color?

    • @andreyuriel3305
      @andreyuriel3305 2 місяці тому

      your EditorJS stopped???

    • @LightMonkeyBrother
      @LightMonkeyBrother 2 місяці тому

      @@andreyuriel3305 editorjs dose not suppoert nextjs server side rendering, i weill try another

  • @prat_0501
    @prat_0501 Рік тому +1

    Awesome tutorial 💯💯 but how to render text by providing JSON data?

    • @livecode247
      @livecode247  Рік тому

      Thank you so much! I'm pretty sure that's part of the video

  • @husniunii97
    @husniunii97 4 місяці тому

    what nextjs version ?

  • @Ckuiper123
    @Ckuiper123 Рік тому

    Nvm my question. My problem was that I had the Editor as part of a map function. So there were more then 1 editors on a page. I changed my code around and got it working now. Here the adjusted code for more editors on a single page.
    import React, { useState, useEffect, useRef } from "react";
    import dynamic from 'next/dynamic';
    export default function Editor() {
    const [isMounted, setIsMounted] = useState(false);
    const ref = useRef();
    const initializeEditor = async () => {
    const EditorJS = (await import("@editorjs/editorjs")).default
    const Header = (await import("@editorjs/header")).default
    if (ref.current) {
    const editor = new EditorJS({
    holder: ref.current,
    tools: {
    header: Header,
    },
    });
    ref.current = editor
    }
    };
    useEffect(() => {
    if (typeof window !== "undefined") {
    setIsMounted(true);
    }
    }, [])
    useEffect(() => {
    const init = async () => {
    await initializeEditor();
    };
    if (isMounted) {
    init();
    return () => {
    if (ref.current) {
    ref.current.destroy();
    }
    }
    }
    }, [isMounted])
    const save = () => {
    if (ref.current) {
    ref.current.save().then((outputData) => {
    console.log(outputData)
    })
    }
    }
    return (


    Save

    )
    };

    • @livecode247
      @livecode247  Рік тому +1

      Thank you for sharing!

    • @Himanshuyadav-us6me
      @Himanshuyadav-us6me 9 місяців тому +1

      Thanks dude.
      I am facing one issue
      Heading in editor are not big, their size is same as normal text.
      Did you face this issue?
      Edit: I got the fix, Tailwind CSS was overriding h1 style

    • @adityapandey1190
      @adityapandey1190 9 місяців тому

      @@Himanshuyadav-us6me Hi, I'm facing the same problem how to counter the overriding?

  • @angelomancilla7153
    @angelomancilla7153 Рік тому

    How do you resolve the errors of typescript about types of modules like table, chekclist and others? I only found types for @editorjs/editorjs__header.

    • @livecode247
      @livecode247  Рік тому

      Ya they don't exist unfortunately, just // @ts-ignore them for now

  • @umuden
    @umuden Рік тому

    You magician..

  • @shreyAtJob
    @shreyAtJob 6 місяців тому

    Could we please get the code?

  • @prateekkukreja9664
    @prateekkukreja9664 5 місяців тому

    which code editor is that?

  • @pranjalgupta2575
    @pranjalgupta2575 Рік тому

    can i do the same using django?

    • @livecode247
      @livecode247  Рік тому

      Not sure how well it works but you can look at this: github.com/2ik/django-editorjs-fields

  • @saipranay3363
    @saipranay3363 Рік тому

    hey can i get link to that code !!

    • @livecode247
      @livecode247  Рік тому

      Oh man, I'm so sorry. I thought I'd posted a Github Link in the description and deleted the directory. The code is somewhat similar to this component written by @joshtriedcoding so you can check that out instead if it helps
      github.com/joschan21/breadit/blob/master/src/components/Editor.tsx

  • @rishabhpanwar8971
    @rishabhpanwar8971 Рік тому +1

    Nice video. I reached out on LinkedIn.

  • @ukrainetoday960
    @ukrainetoday960 9 місяців тому

    Notiion use EditorJS

  • @navaneeth6157
    @navaneeth6157 Рік тому

    discord?