Editing Table On Page - IE #851

Closed
opened 2017-10-19 23:32:05 +00:00 by elogicmedia · 3 comments
elogicmedia commented 2017-10-19 23:32:05 +00:00 (Migrated from github.com)

Hi All,

I found this demo: http://sheetjs.com/demos/modify.html which is perfect for what we are after, I have however run into a snag, the editing sheet on the page doesn't seem to work for any versions of IE.

Going by the demo link it takes me to this page: http://caniuse.com/#search=contenteditable which says IE 11 does support the theml5 contenteditable tag, however on further research it seems like it only works on span or div tags, the script sets this up as a HTML table with the contenteditable tag on the td.

Has anyone come up with a work-around for this? or am I doing something incorrectly? I'm using the demo at the above link, that doesn't work in IE for me either.

Thanks

Hi All, I found this demo: http://sheetjs.com/demos/modify.html which is perfect for what we are after, I have however run into a snag, the editing sheet on the page doesn't seem to work for any versions of IE. Going by the demo link it takes me to this page: http://caniuse.com/#search=contenteditable which says IE 11 does support the theml5 contenteditable tag, however on further research it seems like it only works on span or div tags, the script sets this up as a HTML table with the contenteditable tag on the td. Has anyone come up with a work-around for this? or am I doing something incorrectly? I'm using the demo at the above link, that doesn't work in IE for me either. Thanks
elogicmedia commented 2017-10-19 23:43:24 +00:00 (Migrated from github.com)

As a hack, I did this within the xlsx file, which does work. I was hoping there may be a better way.

function writextag(f,g,h) { return '<' + f + (isval(h) ? wxt_helper(h) : "") + (isval(g) ? (g.match(wtregex)?' xml:space="preserve"' : "") + '><span contenteditable="true">' + g + '</span></' + f : "/") + '>';}

As a hack, I did this within the xlsx file, which does work. I was hoping there may be a better way. `function writextag(f,g,h) { return '<' + f + (isval(h) ? wxt_helper(h) : "") + (isval(g) ? (g.match(wtregex)?' xml:space="preserve"' : "") + '><span contenteditable="true">' + g + '</span></' + f : "/") + '>';}`
reviewher commented 2017-10-20 00:25:10 +00:00 (Migrated from github.com)

The relevant part is in make_html_row -- it makes more sense to add the span there:

if(o.editable) w =  '<span contenteditable="true">' + w + '</span>'
oo.push(writextag('td', w, sp));

More generally, we definitely recommend using a proper JS grid component. We like the canvas-based approach taken by canvas-datagrid -- the included datagrid demo is an example integration that is publicly deployed at http://oss.sheetjs.com/js-xlsx/datagrid

The relevant part is in [`make_html_row`](https://github.com/SheetJS/js-xlsx/blob/master/bits/79_html.js#L87-L89) -- it makes more sense to add the span there: ```js if(o.editable) w = '<span contenteditable="true">' + w + '</span>' oo.push(writextag('td', w, sp)); ``` More generally, we definitely recommend using a proper JS grid component. We like the canvas-based approach taken by [`canvas-datagrid`](https://github.com/TonyGermaneri/canvas-datagrid) -- the included [datagrid demo](https://github.com/SheetJS/js-xlsx/tree/master/demos/datagrid) is an example integration that is publicly deployed at http://oss.sheetjs.com/js-xlsx/datagrid
notyeti commented 2017-10-22 18:01:44 +00:00 (Migrated from github.com)

This is also failing on Edge 14

This is also failing on Edge 14
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#851
No description provided.