JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
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  
Old October 27th, 2004, 02:30 AM
goldrake73 goldrake73 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 7 goldrake73 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 30 sec
Reputation Power: 0
Unhappy WYSIWYG Editor... edit a selected object.

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...

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > WYSIWYG Editor... edit a selected object.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway