Div with contentEditable does not work at all

Hi,

I want to allow user to edit some div.

I have this code snippet:

<ion-content>
   <div contenteditable="true">Click to Edit me</div>
</ion-content>

Is there any explanation why it’s not editable on click?

Here’s a codepen.

Thanks,

Michael

Your codepen works for me in unless I misunderstood your issue.

image

@gmarziou I bet you didn’t try with Safari :wink:

I’ve just succeeded:

<div contenteditable="true" style="-webkit-user-select: text; -khtml-user-select: text;-moz-user-select: text;-o-user-select: text;user-select: text;">

This way it works on Safari and others too.

Yes I was on Chrome or Firefox

when i press Enter, the text in the newline can’t be selected. do you have the same issue?