htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 2: htmlArea 2 & 3 archive (read only): htmlArea v2.0 - Add-Ons:
Table properties - use classes instead of html properties?


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


SanSui
Novice

Feb 26, 2004, 10:05 AM

Post #1 of 7 (3584 views)
Shortcut
Table properties - use classes instead of html properties? Can't Post

After looking at the table properties dialog boxes (using Luis' HTMLArea 2 editor), I'd think it should be possible to insert a class value rather than changing bgColor or whatnot.

Before I try working on this, does anyone have a modification that already incorporates this into the table properties popups? I'm a little uncertain of the syntax here and the DOM for javascript, so it'll take me forever if I do it.

Once I get this done, the editor will have every feature I could possibly need. Thanks to people like Luis, Wei, Taurentius, etc for all the work they've done :)


Luis
Veteran

Feb 27, 2004, 5:04 AM

Post #2 of 7 (3575 views)
Shortcut
Post deleted by Luis [In reply to]

 


SanSui
Novice

Feb 27, 2004, 11:04 AM

Post #3 of 7 (3568 views)
Shortcut
Re: [Luis] Table properties - use classes instead of html properties? [In reply to] Can't Post

Thank you very much for your help :)

I can see how it should work and should be able to apply it to the rest of the property dialog boxes just fine. My only problem now is that I get an error in this area:


--------------------------------------------------------------------------------
Code
--------------------------------------------------------------------------------

myClass.selectedIndex = 0;
for (var i=0; i< myClass.length; i++) {
if (myClass.value.toLowerCase() == table.myClass.toLowerCase()) {
myClass.selectedIndex = i;
}
}

--------------------------------------------------------------------------------
It tells me that table.myClass is null or not an object. I do have the select box on the page and it is named "myClass". If I add something like this - table.myClass="heading"; before it gets to the for statement, it doesn't error. So I guess the problem is that in the Init function it isn't getting the initial value from the select box and thinks that it's empty?


SanSui
Novice

Feb 27, 2004, 12:25 PM

Post #4 of 7 (3563 views)
Shortcut
Re: [SanSui] Table properties - use classes instead of html properties? [In reply to] Can't Post

I'm actually not sure at all what that snippet is for... it seems to work just fine without it.

Can't believe how simple it was to add this Shocked

Aside from the multiple editor bug, this is now almost perfect for my needs :) With the addition of the filemanager and now style management for both tables and text blocks, it's got everything!


Luis
Veteran

Feb 27, 2004, 1:30 PM

Post #5 of 7 (3562 views)
Shortcut
Re: [SanSui] Table properties - use classes instead of html properties? [In reply to] Can't Post

Hi SanSui:

It's supposed to be to retrieve an existing class of an existing table when editing. I'll check the sintax later and let you know later.

Greetings.


Don't give up!!
http://webstationone.com/test/htmlarea


Luis
Veteran

Feb 27, 2004, 9:03 PM

Post #6 of 7 (3550 views)
Shortcut
Re: [SanSui] Table properties - use classes instead of html properties? [In reply to] Can't Post

Hi SanSui:

Everything was wrong in last night's code. This other code is good and tested:

In function Init():

myClass.selectedIndex = 0;
for (var i=0; i< myClass.length; i++) {
if (myClass.value.toLowerCase() == table.className.toLowerCase()) {
myClass.selectedIndex = i;
}
}



In function btnOKClick() :
table.className = myClass[myClass.selectedIndex].value;

Sorry for posting the wrong code. I'll delete it to avoid confussion to other users.


Don't give up!!
http://webstationone.com/test/htmlarea


SanSui
Novice

Mar 1, 2004, 4:18 PM

Post #7 of 7 (3525 views)
Shortcut
Re: [Luis] Table properties - use classes instead of html properties? [In reply to] Can't Post


In Reply To
Hi SanSui:

Everything was wrong in last night's code. This other code is good and tested:

In function Init():

myClass.selectedIndex = 0;
for (var i=0; i< myClass.length; i++) {
if (myClass.value.toLowerCase() == table.className.toLowerCase()) {
myClass.selectedIndex = i;
}
}



In function btnOKClick() :
table.className = myClass[myClass.selectedIndex].value;

Sorry for posting the wrong code. I'll delete it to avoid confussion to other users.



 
 
 


Search for (options)