What is the correct approach to have a default hint text for a TextBlock similar to HTML 5 placeholder attribute?
Thanks
Alain
What is the correct approach to have a default hint text for a TextBlock similar to HTML 5 placeholder attribute?
Thanks
Alain
Actually, I think you are asking about the placeholder attribute of an <input>
element in a text editor, not about the appearance of a TextBlock visual object in GoJS.
You can certainly customize your text editor however you like. Please read:
GoJS HTML Interaction -- Northwoods Software.
See also how the standard editor is implemented, at: https://gojs.net/latest/extensions/TextEditor.js. It’s demonstrated at: HTMLInfo Text Editor
Yes I was asking similar to the placeholder attribute of input or textarea.
From your link I get it to understand that it is not available in the base TextBlock but we can implement a custom text editor like in TextEditor.js and there set the html placeholder to the value that we want.
That’s correct.