|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Hello, I'am building a wysiwyg editor and I have trouble to detect an object like a TABLE, an IMAGE etc...
Example: I've insert a TABLE in design mode and then I would like to select it and then edit its properties... I found a method that works very well but it only with MSIE... Is there anyone that can help me to do the same thing compatible with MOZILLA & Co. browsers ??? Here is my code... if (this.myEditor.document.selection.type == 'Control') { var range = this.myEditor.document.selection.createRange(); // Check if one object is selected if (range.length == 1 && (range(0).tagName == 'TABLE' || range(0).tagName == 'table')) { current_width=range(0).width; current_height=range(0).height; current_border=range(0).border; current_bordercolor=range(0).borderColor; current_cellspacing=range(0).cellSpacing; current_cellpadding=range(0).cellPadding; current_align=range(0).align; current_bgcolor=range(0).bgColor; alert (current_width); // alert other variables to view... return true; } } Thanks for anyone who will try to help me... |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > WYSIWYG Editor... edit a selected object. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|