0

I want to put textboxes (that can be edited) on a HTML5 canvas. (Example : like in a "Paint" software, you can create textboxes).

Is it really needed to use third-party libraries such as https://github.com/claydotio/Canvas-Input in order to do such a basic thing? Isn't there no simple solution for creating textboxes in a HTML5 canvas?

If so, is there are a library (for Textbox inside ) that is considered as standard?

Basj
  • 41,386
  • 99
  • 383
  • 673
  • A third party wouldn't be able to do it either if it required a third party library. – Rob Jan 12 '14 at 20:53
  • sorry, I didn't get it ? :) – Basj Jan 12 '14 at 20:54
  • If a third party library was necessary to do what you want, how would the first third party library ever work? Libraries are built with standard code anyone can use. – Rob Jan 12 '14 at 20:55

1 Answers1

2

No, canvas is a bitmap and has no support for controls or DOM elements such as input boxes.

All the logic for that must be made manually by simulating such a functionality.

You can take a look at my previous answer for one way of doing this.

Community
  • 1
  • 1
  • How would you do then to add inputboxes on a canvas ? – Basj Jan 12 '14 at 20:54
  • @Basj see for example http://stackoverflow.com/questions/21011931/i-am-trying-to-edit-text-on-canvas/21011975#21011975 –  Jan 12 '14 at 20:55