Define view as contentEditable="true"


#1

I am trying to implement a span element that has the contentEditable property to “true”. I was thinking about creating the span as a view which is encapsulated by a component. That way I can register events on the span element to show additional buttons within the component when the span is edited, which then allow to submit the changes. However, I haven’t been able to somehow set the contentEditable property. I can define classes and add them to the view the way it is described in the docs, but setting the contentEditable property fails. Is there a way to set that property? Probably there even is a better way to implement something like that?


#2

Dang, just found that blog post, which seems to do what I was looking for: http://www.kaspertidemann.com/handling-contenteditable-in-ember-js-via-ember-contenteditableview/