Hi All,
When I resize a table using the resize handles, the tables gets a new width and height represented in 'px'. I would like this to be in percent. I am going to calculate the value based on the fixed width resulting from the resize, and the width of the editing area.
My problem is that I do not know how to hook into an event that gets called when the resize is complete. Ideally I want to be able to do:
I can't seem to attach the handler, though I'm not entirely sure the handler is valid for a table element. I've also tried to hook in with 'onclick', but to no avail - the event simply not firing. I thought that perhaps there may be something in the editor initialization that is doing something with these events, and perhaps I need to register it in a certain manner.
Any ideas?
When I resize a table using the resize handles, the tables gets a new width and height represented in 'px'. I would like this to be in percent. I am going to calculate the value based on the fixed width resulting from the resize, and the width of the editing area.
My problem is that I do not know how to hook into an event that gets called when the resize is complete. Ideally I want to be able to do:
table.attachEvent ( 'onresize', fixupWidth ); function fixupWidth() { var tableFixedWidth = table.offsetWidth ; var editorWidth = FCK.EditorDocument.body.offSetWidth ; SetAttribute( table, 'width', ( tableFixedWidth / editorWidth ) + '%' ; }
I can't seem to attach the handler, though I'm not entirely sure the handler is valid for a table element. I've also tried to hook in with 'onclick', but to no avail - the event simply not firing. I thought that perhaps there may be something in the editor initialization that is doing something with these events, and perhaps I need to register it in a certain manner.
Any ideas?