fmeringdal / nettu-meet

Open source video conferencing system for tutors.
GNU Affero General Public License v3.0
2.28k stars 286 forks source link

Add textbox to canvas #8

Open stefanrehm opened 3 years ago

stefanrehm commented 3 years ago

Hi there, amazing tool!

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

Thanks!

fmeringdal commented 3 years ago

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? :)

stefanrehm commented 3 years ago

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

clarissalimab commented 3 years ago

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? 🙂

fmeringdal commented 3 years ago

@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