I am using contenteditable attribute in this way.
${row.pno}.
As the data is retrieved from the DB, few values can be null. I can edit the span with some value. The problem is I cannot edit the blank(null text) span. How can i achieve this.
Thanks and Regards
Adeeb
An element with the
contenteditableattribute is editable even if the element is initially empty, as in<span contenteditable></span>. The user just can’t focus on it by clicking on it. But he can use the TAB key to move to the element and then type or paste something.The conclusions depend on the context. For example, if the
spanelement is the sole content of a table cell, you could setdisplay: blockon it, making it occupy the entire. Assuming that other cells imply nonzero width and height for that cell, the editable element would have them too and be clickable.