I have two tables inside contenteditable
div. I applied selectable
class to first table. My problem is, I can insert text in second table but can not insert text in first table.

- 69,918
- 32
- 186
- 246

- 1,514
- 3
- 18
- 39
-
4But with the same **[fiddle](https://jsfiddle.net/waou22dp/4/)** you gave I was able to insert text in first Table too!! What is the problem?? – Guruprasad J Rao Apr 29 '15 at 06:13
-
@GuruprasadRao I checked my fiddle and found that `selectable` class is not applied to first table. – Prashant16 Apr 29 '15 at 06:38
-
Check https://jsfiddle.net/waou22dp/11/ – ketan Apr 29 '15 at 07:05
-
@ketan. He is trying to **`select the table`** and make it **`editable`** at a single instance and I don't think it's possible!! – Guruprasad J Rao Apr 29 '15 at 07:08
-
http://chat.stackoverflow.com/rooms/43899/asp-net – Anant Dabhi Apr 29 '15 at 09:52
-
possible duplicate of [Insert text in input box in contenteditable div in IE](http://stackoverflow.com/questions/29863549/insert-text-in-input-box-in-contenteditable-div-in-ie) – Madan Sapkota Apr 29 '15 at 14:12
1 Answers
The problem might be due to the version of jquery
you were referring.
You were referring jquery-1.8.3.js
and jquery-ui-1.9.2.js
which might have caused incompatibility with the versions and in the console
I was able to see .selectable
function was undefined
and an Uncaught TypeError: $(...).selectable is not a function
error. Now I just changed the jquery
version to jquery-2.0.2.js
and jquery-ui-1.10.3.js` and that actually is compatible!!
Check this Updated Fiddle
UPDATE:
I don't think it's possible!! because you are trying to override an event where both cannot occur at a time!! I tried applying below method, but even that will not be useful many times. Having said that it will be working, I mean click happens and it becomes editable only after multiple consecutive clicks:
$(document).ready(function(){
$('#tbl1').selectable({
filter: "td"
}).on('click',function(){
$(this).attr('contenteditable','true');
});
});
Here is the Fiddle

- 29,410
- 14
- 101
- 200