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:
undo bgcolor


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.

 


esthera
User

Feb 13, 2004, 3:03 AM

Post #1 of 5 (3783 views)
Shortcut
undo bgcolor Can't Post

using luis's editor the undo has no effect on the bgcolor.

Is their anyway to make the undo work?


Luis
Veteran

Feb 13, 2004, 11:42 AM

Post #2 of 5 (3780 views)
Shortcut
Re: [esthera] undo bgcolor [In reply to] Can't Post

Hi esthera:

I think I had answered this question before. There is no way. The bgcolor is a hack I made. Remember that the editor doesn't include the body tag by itself and bgcolor is an attribute of <BODY>.

Trust me. That's not possible, unless you want to spent hundreds of hours in development trying to achieve something (or not) that can be done with a click of a button (which is already done).

Regarding some of your other previous questions, There are some things that I have been fixed. I'll tell you later what.

Greetings


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


esthera
User

Feb 14, 2004, 11:54 AM

Post #3 of 5 (3768 views)
Shortcut
Re: [Luis] undo bgcolor [In reply to] Can't Post

Luis,

Thanks for your reply. Sorry I didn't see it before. I just used the html area in a project I did for someone and he is finding all these little things that I can't seem to fix.

If you have fixed anything else I asked about please let me know.



Thanks,

Esther


esthera
User

Mar 14, 2004, 3:13 AM

Post #4 of 5 (3676 views)
Shortcut
Re: [Luis] undo bgcolor [In reply to] Can't Post

Luis:

Iv'e been trying to come up with a hack like you did for the bgcolor.

Do you think the following might work? (You know the code much better than me so if you can give me your opinion I would appreciate it)

I would make a hidden variable called changedbgcolor and set to 0, I would have another hidden variable called lastbgcolor. When the bgcolor is changed then the changedbgcolor variable is set to 1 and the lastbgcolor is set to the last bgcolor. As each change is made (not bgcolor) the variable would be set to 0 once again. When undo is done I will check if the variable is 1 and if so go to the changedbgcolor variable and change it back.

What do you think? Is this possible?


Luis
Veteran

Mar 14, 2004, 2:15 PM

Post #5 of 5 (3665 views)
Shortcut
Re: [esthera] undo bgcolor [In reply to] Can't Post

Hi esthera:

You really don't give up!. That's good.

It's possible to keep track of changed bgcolors. That should be easy. What is not easily possible and worth enough to spend so much time in developing the ability, is to keep track of when you changed the bgcolor to append it into its actual position in the undo history.

Let's say you made bold, italics, bgcolor, underline. When you undo the actions, you can know which bgcolor you changed. but you cannot undo it because undo will recognize exactly the reverse order without the bgcolor: underline,italics,bold.

My guess is in order you can achieve what you want, you need to keep track not only of the bgcolor changes, but of every single action you perform in the editor, storing one variable for each one of them. That would speed down your editor extremely and you will run out of memory quickly. In addition, you need to make a completely customized undo-redo function.

Greetings


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

 
 
 


Search for (options)