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

Поделиться
HTML-код
  • Опубликовано: 2 дек 2024

Комментарии • 42

  • @angadsingh5636
    @angadsingh5636 3 месяца назад +1

    my goat, right when i needed to build an editor

  • @sukritsaha5632
    @sukritsaha5632 10 месяцев назад

    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  9 месяцев назад

      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 9 месяцев назад

      @@livecode247 Yeah, I agree

  • @michaelyabut5969
    @michaelyabut5969 6 месяцев назад +1

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

  • @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

  • @mihiramin1091
    @mihiramin1091 Год назад +1

    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

  • @husniunii97
    @husniunii97 2 месяца назад

    what nextjs version ?

  • @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

  • @shreyAtJob
    @shreyAtJob 4 месяца назад

    Could we please get the code?

  • @AbhilashShibu-d4u
    @AbhilashShibu-d4u 2 месяца назад

    Bro what's your vim setup like, I'm trying to get into vim. Could you help me out or point me in the right direction

    • @livecode247
      @livecode247  2 месяца назад

      I'm using Neovim, and this is my own custom configuration which you can find here: kavin.me/dots
      Honestly, I would suggest to start off just use vim keybindings in VSCode or ay other code editor that you use to just get used to the motions.

  • @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

  • @LightMonkeyBrother
    @LightMonkeyBrother 17 дней назад

    how to change text color?

    • @andreyuriel3305
      @andreyuriel3305 13 дней назад

      your EditorJS stopped???

    • @LightMonkeyBrother
      @LightMonkeyBrother 12 дней назад

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

  • @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 7 месяцев назад +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 7 месяцев назад

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

  • @prateekkukreja9664
    @prateekkukreja9664 3 месяца назад

    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

  • @umuden
    @umuden Год назад

    You magician..

  • @ukrainetoday960
    @ukrainetoday960 7 месяцев назад

    Notiion use EditorJS

  • @rishabhpanwar8971
    @rishabhpanwar8971 Год назад +1

    Nice video. I reached out on LinkedIn.

  • @navaneeth6157
    @navaneeth6157 Год назад

    discord?

    • @livecode247
      @livecode247  Год назад

      Here it is: kavinvalli

    • @navaneeth6157
      @navaneeth6157 Год назад

      @@livecode247 no i mean server like any community?

    • @livecode247
      @livecode247  Год назад

      Oh, no 😔. Not that big yet lol