I have some Editor boxes that I'd like to add placeholder text to.
<textarea rows="10" cols="20" data-bind="kendoEditor: {
value: Text,
attr: { placeholder: 'Test place holder' }}" >
</textarea>
It looks like the placeholder text tag isn't passed through from the textarea to the editor.
Here's a sample editor box to play with: http://jsfiddle.net/cN2ke/
I think I'll have to listen for the Editor's change event, and if there's no text paste in my watermark HTML.
The problem I have with that is when the page's posted how to strip the watermark's back out. I guess I could do a string compare on the placeholder value but that seems kind of cheesy to me.
Thought I'd check and see if anyone has a good solution for water mark text in an editor control
Thanks!
Here's my implemented solution
Text area
In the View Model Create an options variable with the control's Id, observable, and placeholder text
On load, I bind to the focus/blur of the editor box. And before posting the form back, I clear out placeholder text from the observables.