htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Bug Reports & Fixes:
So much is good but ...


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.

 


chrish
New User

Feb 17, 2005, 3:48 PM

Post #1 of 2 (22789 views)
Shortcut
So much is good but ... Can't Post

I've been evaluating htmlarea for a short while. I really want it to work (so short got longer) but ...

1) Double "back"

Behaviour: click the browser "back" button - doesn't work or you have to do it twice - yeuch - most humans won't get that.

Reason: iframe initialisation takes the form of:

doc.open();
var html = "<html>\n";
etc.
doc.write(html);
doc.close();

That'll push you a point on the browser history every time.

Solution:

doc.body.innerHTML = editor._textArea.value;

2) HTMLArea.loadStyle and IE @import death

Behaviour: If you try to add htmlarea to a page that is already doing a @import for css - the loadstyle approach for adding further css causes IE to die with a "page cannot be loaded error".

Solution: nasty - but disabling the "loadstyle" and including the desired .css in the main page @import list works.

3) Dynamic Editor Sizing (Time for something good) ...

Behaviour: Want to dynamically resize yout editor? Well ...

this._iframe.style.height = my_new_height+"px";
this._textArea.style.height = this._iframe.style.height;

works a treat. Wrap this is a toolbar triggered function and users can just grow or shrink the editor at will - the whole "Fullsize" nastiness just goes away.

4) Memory Management (or my brick wall) - please please tell me i'm wrong!

Behaviour: (to the casual observer = me initially) - things get slow (and to the not so casual = me eventually) - memory leaks amazingly! Had both IE and FF > 100Mb I guess the slow down occurs as the poor client increasingly thrashes to allocate.

Discussion: The entire code base assumes the wonders (not) of js garbage collection. See this:
http://jgwebber.blogspot.com/2005/01/dhtml-leaks-like-sieve.html

Sigh ... all those anon functions, all those js/dom cross references.

By way of example - just clicking in an htmlarea can ramp both IE and FF by 4-8k ... (stops if you disable status bar) so we rather suspect that just resetting the this._statusBarTree by doing an innerHTML='' is locking down all those a.el and a.editor refs - my personal bete noir is the onclick= function () {stuff}; etc.

I've been working through various fixes for all this - the mem inc on a simple refresh is now < 100k but it's beginning to get old ...

What I'd really like is a "hey fool - just do this" or even a "nah - stop wasting you time 'cos ..."

Here's hoping,
Chris

PS: Item 3 above is pretty neat tho

PPS: Context menu people - "IE_IS_A_FUCKING_SHIT" - i kno + u kno but rise above - especially when that var is gonna land on a whole load of innocent folks machines - as is - app failure for reason of decency blocking is pretty mad and anyway - you sort of gainsay yourself by getting the :

if (!HTMLArea.is_ie) positioning case wrong - which should be:

var ifpos = getPos(self.editor._iframe);
var x = ev.clientX + ifpos.x;
var y = ev.clientY + ifpos.y;
div.style.left = (x+4) + "px";
div.style.top = (y+4) + "px";

which does indeed position the cm where you want it - by the click - just like the *working* ie code - or maybe it's all just you being ie flaks and - having a laugh?

Wink Chris


stanislas
Novice

Feb 18, 2005, 11:59 PM

Post #2 of 2 (22729 views)
Shortcut
Re: [chrish] So much is good but ... [In reply to] Can't Post

Hi Chris,

If you would like to share some of your code fixes for the memory management problem, I may be able to understand better what needs to be done, try to apply the approach to other parts of the code, and help you/us progress on this path.

Regards,
Stanislas Rolland
Saint-Lambert, Qu´┐Żbec

 
 
 


Search for (options)