Editor.js package

  • building_stuff-1329042815879217175

    Janis

    24 days ago

    Since there does not seem to be a post in packages for editor.js, I'm asking my question here:

    1. Does anyone know whether it is possible to completely remove the option for users to make any changes to a tool-type, e.g. in my case to the text. I only want the user to be able to change the text if required, but not add any further tools. I know I can set all the tools to false but then it still shows the plus and drag icons.
    2. When I load the component initially, then the data is not shown. only after navigating to another tab and coming back to this tab, the data is shown. I tested both saving the content in a variable from the api call and from the call directly, but i always have to go back and fort.

    Thank you very much for your help! πŸ™‚
    1329042816067702887-image.png
  • kamilnader-1329158614413344830

    Kamil

    24 days ago

  • kamilnader-1329159412182679603

    Kamil

    24 days ago

    I'm not exactly sure what you mean. What about setting the read-only attribute to true?
  • building_stuff-1329167805416996914

    Janis

    24 days ago

    Ahh I just couldn’t find it πŸ™ˆ
  • So I still want to be able to edit the text just without all the options as it is just text.
    1329167995938930768-IMG_6635.png
  • I would like to remove the plus and drag icons but keep the text edit possibility. Does that make sense? In the editor.js docs it said to just keep them empty but that didn’t work πŸ€”
  • kamilnader-1329352118988963893

    Kamil

    23 days ago

    @Janis In that case, the only thing you can do is add some CSS to the page.
    .ce-toolbar__actions {
    display: none;
    }
    πŸ‘1
  • building_stuff-1329550595652325480

    Janis

    23 days ago

    Ah perfect, thank you so much. Works like a charm! I see you just went to inspect element and hide it πŸ™
  • building_stuff-1329551048683163761

    Janis

    23 days ago

    Regarding my 2nd question, do you have an idea why it doesn't load the content initially?
  • Like you can see in the recording, only when i move tabs and then come back the content loads. i tried loading it from a variable directly as well as from the call itself, but both times the same issue appears.
  • Thank you so much, very much appreciate your help!
  • building_stuff-1329552184349556776

    Janis

    23 days ago

    I also have other content on the page from the same api call that shows just fine, so i guess it has to do with the initialiation of the component or so?! πŸ€”
  • kamilnader-1329721042872303719

    Kamil

    22 days ago

    I will take a look today. I do plan to update the package, as it has been quite a while since I built it. I'll let you know if it's a bug or something else.
    πŸ™1
  • kamilnader-1329726446695874594

    Kamil

    22 days ago

    Okay @Janis, I took a quick look, and it works just fine for me. Can you send me your toddle username so I can invite you to the project where I'm testing this? Let's see if we can fix your case.
    πŸ‘1
  • building_stuff-1329734340963336222

    Janis

    22 days ago

    Hey @Kamil Thank you so much, will share it via DM!
    πŸ‘1
  • building_stuff-1329845670466683043

    Janis

    22 days ago

    Update: Create a showEditor variable with an initial state of false and set it to true when the api has returned the content
    πŸ‘1

Stop scrolling. Start building.

toddle is a visual web app builder that rivals custom code β€” but accessible to your entire team!

Try toddle β€” it's free!

Β© Copyright 2024 toddle. All rights reserved.