fmeringdal / nettu-meet

Open source video conferencing system for tutors.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add textbox to canvas

stefanrehm opened this issue · comments

Hi there, amazing tool!

Would it be possible to add "textboxes" to the Canvas so that I can also write text?

Thanks!

Sure, that should be quite easy to add. I will try to find some time within one or two weeks to add this.
Or if you would like to make a shot at adding this feature yourself, I could write up a detailed issue for you? :)

That would be awesome. If I could, I would love to do that. But, unfortunately, I cant... :/

Hey @fmeringdal! I'd like to give it a try, but I don't know how to start. Can you help me with this one? 🙂

@clarissalimab That is awesome, this will be a great improvement!

This is what I think needs to be done first:

  1. Update the canvas toolsbar file to include a "insert text button". This should when clicked call the canvasManager.insertText method which you will need to create.
  2. Update the canvas manager file
    Create a public insertText method (similar to the insertImage method), this should create a fabric.IText object and add it to the canvas this.addObject(textObject, true).

It might also be useful to read up on fabric.js library which is what we are using in the canvas.

There will be some more things that will be needed, but I think this is enough to get you started :)
Let me know if something is unclear