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 - Discussion:
New Release: James' Unofficial Fork


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.

First page Previous page 1 2 3 Next page Last page  View All


sleemanj
User

Jan 7, 2005, 11:10 AM

Post #1 of 66 (6020 views)
Shortcut
New Release: James' Unofficial Fork Can't Post

 
Hi all,
I'll keep this short. Attached is my personal unofficial fork of htmlArea, for a quick look you can see it in action at...

http://code.gogo.co.nz/htmlarea/examples/stylist.html

Whats different to the regular old htmlArea?

* Bug fixes. Many and varied but most importantly this version should be more happy running in Gecko (Mozilla). Particular work has gone into making multiple editors work properly in Mozilla.
* Panels. Previously the best plugins could do was add a button or selector to a toolbar. Now they can get a "panel" on a side of the editor to put stuff. Only the Stylist plugin (below) uses this currently, but I have other ideas for plugins that could be good there.
* Fullscreen. The existing "popup editor" method of having a fullscreen editor was a rubbish (sorry mishoo, no offence, but it was) idea. We now have a better way (see below).
* Toggle borders. A simple button that does it's best to toggle borders on tables, not great but it is better than nothing.
* Reorganised the default toolbar.
* The toolbar buttons are now combined into one large image. This makes the load time much quicker because it drastically reduces the number of requests to the server.
[Developers: see images/ed_buttons_main.gif to see how the image is constructed, and the buttons setup in htmlarea.js (search for ed_buttons_main.gif) to see how to use it. It's backwards compatabile, so existing plugins will be fine with it.]

* A few new helper functions have been added to htmlarea.js which plugin authors might wish to make use of. I need to go through and reorganise some of that code and comment a few things but it's reasonably clear.

New Plugins (these are not compatable with Mishoo's htmlArea, mine provides some added features they make use of)


-- Stylist
Takes CSS and produces a panel where you may select styles to apply to the current text. See the link above for an example.

-- FullScreen
A better fullscreen system. Does not use a popup window, it actually expands the existing editor to fill the entire window and disables the window scrollbars. A huge improvement! When this plugin is registered it will seek out the existing 'popupeditor' button in your toolbar and replace it. If your toolbar doesn't have the 'popupeditor' then it will add a button called 'fullscreen' which you can place in your toolbar.


-- SuperClean
Combines an implementation of HTMLTidy, with the existing word cleaner and some options for font-cleaning (striping typefaces, sizes, styles, all optionally). When this plugin is registered it will seek out the existing 'killword' button in your toolbar and replace it. If your toolbar doesn't have the 'killword' then it will add a button called 'superclean' which you can place in your toolbar.

-- Linker
An enhanced link-picker dialog including dTree for an explorer type interface.

See the (source of the) file "examples/stylist.html" in the package to see how to use the plugins above, it's very, very simple.

Ok. The archive is attached, it's a completly raw archive, just my CVS working copy which I've stripped the CVS stuff from, so there are a few backup files and junk in there and various build files. But it does work fine, just use it like you use Mishoo's htmlarea, and as always, see the examples directory.

The attached file is a bz2 because the zip was too big, if you can't use the bz2 (winzip should be fine with it) you can download the zip from http://www.gogo.co.nz/htmlarea.zip


James Sleeman
PHP Programmer


(This post was edited by Theo on Mar 10, 2005, 3:31 PM)
Attachments: htmlarea.tar.bz2 (213 KB)


sleemanj
User

Jan 7, 2005, 12:30 PM

Post #2 of 66 (5984 views)
Shortcut
Re: [sleemanj] New Release: James' Unofficial Fork [In reply to] Can't Post

If anyone had downloaded the archive, do so again as I put in some incorrect files which caused IE to not be too happy.


James Sleeman
PHP Programmer


sleemanj
User

Jan 8, 2005, 9:38 AM

Post #3 of 66 (5949 views)
Shortcut
Re: [sleemanj] New Release: James' Unofficial Fork - Update 2 [In reply to] Can't Post

2nd update added today.

* The toolbar buttons are now combined into one large image. This makes the load time much quicker because it drastically reduces the number of requests to the server.

Developers can see images/ed_buttons_main.gif to see how the image is constructed, and the buttons setup in htmlarea.js (search for ed_buttons_main.gif) to see how to use it. It's backwards compatabile, so existing plugins will be fine with it.

Download from the first post in this thread.


James Sleeman
PHP Programmer


Ecco
Novice

Jan 10, 2005, 10:38 AM

Post #4 of 66 (5787 views)
Shortcut
Re: [sleemanj] New Release: James' Unofficial Fork - Update 2 [In reply to] Can't Post

I aint got much to contribute at this point. Just wanted to say that it works, that I love it, and that I want to migrate Smile


sulleleven
Novice

Jan 12, 2005, 2:40 PM

Post #5 of 66 (5615 views)
Shortcut
Re: [sleemanj] New Release: James' Unofficial Fork - Update 2 [In reply to] Can't Post

This is just great. Much better. Thanks so much for releasing it.

sull


emanresu
Novice

Jan 13, 2005, 12:49 PM

Post #6 of 66 (5520 views)
Shortcut
Re: [sleemanj] New Release: James' Unofficial Fork - Update 2 [In reply to] Can't Post

Thanks so much for working on this and releasing this fork. It looks very promising. I have one question for now.

Can I use the TableOperations and ContextMenu plugins with your forked version? If so, you might want to turn them on in your demo so people are aware of that.

We have about 30-40 businesses using a product that uses htmlArea, and I am considering starting to use your forked version in new releases of our product. However, I probably won't be able to do this unless the TableOperations plugin and, less importantly, the ContextMenu plugin are supported.

Thanks!


sleemanj
User

Jan 13, 2005, 4:45 PM

Post #7 of 66 (5477 views)
Shortcut
Re: [emanresu] New Release: James' Unofficial Fork - Update 2 [In reply to] Can't Post

Table Ops definatly does, I don't think I've checked context menu, I'll do so later.

In general, my fork should be compatable with any 'usual' plugins, contextmenu I think is a bit special though which may require a patch.


James Sleeman
PHP Programmer


phirschybar
Novice

Jan 13, 2005, 7:14 PM

Post #8 of 66 (5456 views)
Shortcut
Re: [sleemanj] New Release: James' Unofficial Fork - Update 2 [In reply to] Can't Post

sleemanj, THANKS!! for taking this project on. much appreciated!


ozroy
New User

Jan 13, 2005, 7:46 PM

Post #9 of 66 (5451 views)
Shortcut
Re: [phirschybar] New Release: James' Unofficial Fork - Update 2 [In reply to] Can't Post

Thank you for this. It's fixed most of the problems I was having with it.

The only one that hasn't been fixed is the inability to go back from any page that has the htmlarea.

:)


yermo
Novice

Jan 14, 2005, 1:24 AM

Post #10 of 66 (5369 views)
Shortcut
Re: [sleemanj] New Release: James' Unofficial Fork - Update 2 [In reply to] Can't Post

I may have found a bug in the version downloaded from your site yesterday (13 Jan):

RedHat 9 using FireFox 1.0:

1. type in some text into the editor.

2. highlight part of the text including the end.

3. select bold (or link, etc)

4. now attempt to unset bold (or link, etc) and continue typing.

You will not be able to. Once you continue typing bold (or link) will just reset to on.


(This post was edited by yermo on Jan 14, 2005, 1:26 AM)


sleemanj
User

Jan 14, 2005, 2:43 AM

Post #11 of 66 (5339 views)
Shortcut
Re: [yermo] New Release: James' Unofficial Fork - Update 2 [In reply to] Can't Post

I think you'll find that's a problem in the official htmlArea also (correct me if I'm wrong) and it's really more a problem with the browser(s) than htmlArea.

Basically, paricularly in Gecko (Mozilla) it's hard, next to impossible to "get out of" a tag when there is only whitespace (or the start/end of the file) before/after the tag.

So what you see is the editor containing code like

"<strong>blah</strong>" and then you can't get "out" of the strong tag.

I find it especially annoying myself when making links, for example, typing in some text in the editor and selecting some words at the end of the (unfinished) sentance to make into a link, then when I continue the sentance it's necssary to go to code view to add some text after the link in order to break out of it.

I've experience similar problems in, for example, Thunderbird (and I guess Mozilla Composer (the HTML editor component of Moz)), so it's not isolated to HTMLArea.

I'm not entirely sure of a good way of solving it. Any suggestions would be appreciated.


James Sleeman
PHP Programmer


gdoumenc
Novice

Jan 14, 2005, 9:41 AM

Post #12 of 66 (5267 views)
Shortcut
Re: [ozroy] New Release: James' Unofficial Fork - Update 2 [In reply to] Can't Post

Waouh!!!! Super!!!
Hope this fork will continue, if you need some help I will be pleased to join


mmcw
User

Jan 14, 2005, 9:42 AM

Post #13 of 66 (5263 views)
Shortcut
Re: [sleemanj] New Release: James' Unofficial Fork - Update 2 [In reply to] Can't Post

Nice update and fixing the slow loading problem with all the images.

I am having however the following problems:

I am tying to use my own toolbar order hoever then a few plugins will not work anymore??


Code
   

<script type="text/javascript">
_editor_url = "../";
_editor_lang = "en";
</script>
<script type="text/javascript" src="../htmlarea.js"></script>
<script type="text/javascript" src="../lang/en.js"></script>

<style type="text/css">
html, body {
font-family: Verdana,sans-serif;
background-color: #fea;
color: #000;
}
a:link, a:visited { color: #00f; }
a:hover { color: #048; }
a:active { color: #f00; }

textarea { background-color: #fff; border: 1px solid 00f; }
</style>

<script type="text/javascript">
var editor = null;
HTMLArea.loadPlugin("Stylist");
HTMLArea.loadPlugin("SuperClean");
HTMLArea.loadPlugin("FullScreen");
HTMLArea.loadPlugin("ContextMenu");
HTMLArea.loadPlugin("ListType");
HTMLArea.loadPlugin("TableOperations");
function initEditor() {
editor = new HTMLArea("ta");
editor.registerPlugin(Stylist);
editor.registerPlugin(SuperClean);
editor.registerPlugin(FullScreen);
editor.registerPlugin(ContextMenu);
editor.registerPlugin(ListType);
editor.registerPlugin(TableOperations);
var cfg = editor.config;

// the following customises the toolbar
cfg.toolbar = [
[ "htmlmode", "popupeditor", "space", "fontname", "space",
"fontsize", "space", "formatblock", "space", "bold", "italic",
"underline", "separator", "strikethrough", "subscript", "superscript",
"killword", "separator", "about" ],
[ "linebreak", "copy", "cut", "paste", "space", "undo", "redo",
"justifyleft", "justifycenter", "justifyright", "justifyfull",
"separator", "orderedlist", "unorderedlist", "outdent", "indent",
"separator", "forecolor", "hilitecolor", "separator", "inserttable",
"toggleborders", "separator", "inserthorizontalrule", "createlink",
"insertimage" ]
];

// We can load an external stylesheet like this - NOTE : YOU MUST GIVE AN ABSOLUTE URL
// otherwise it won't work!
cfg.stylistLoadStylesheet(document.location.href.replace('stylist.html', 'stylist.css'));

// Or we can load styles directly
cfg.stylistLoadStyles('p.red_text { color:red }');

// If you want to provide "friendly" names you can do so
// like (you can do this for stylistLoadStylesheet as well)
cfg.stylistLoadStyles('p.pink_text { color:pink }', {'p.pink_text' : 'Pretty Pink'});

// That's it, pretty easy huh!
editor.generate();
}

</script>

</head>

<body onload="initEditor()">



I am using the above code!

Then all of the plugin do not work.
Removing the toolbar part will make it work again.

In both situation the ListType plugin wil not work!

How to make it work to set my own Toolbar order?


(This post was edited by mmcw on Jan 14, 2005, 10:33 PM)


Randyd
Novice

Jan 14, 2005, 10:23 AM

Post #14 of 66 (5255 views)
Shortcut
New Release: James' Unofficial Fork - Update 2 [In reply to] Can't Post

Great, I can't wait to try it. I'm using Mishoo's on Wordpress 1.2.2

One thing. I've tried using the insert table but I haven't been able to make it validate as XHTML so I got rid of it. Same with the insert horizontal rule. Does your update correct that?

I'd also like to be able to have control over table background and border colors.

Thanks for now.

Randy


(This post was edited by Randyd on Jan 14, 2005, 10:25 AM)


phirschybar
Novice

Jan 14, 2005, 10:55 AM

Post #15 of 66 (5245 views)
Shortcut
Re: [Randyd] New Release: James' Unofficial Fork - Update 2 [In reply to] Can't Post

Great work!

I am having an issue however.

On of my clients just called and said that he cannot edit text in the HTMLArea box in IE6 for windows. I have IE6 and am having no problem at all though. He is getting an "error on page":

Line: 853
Char: 3
HTMLArea.l18n.msg is null or is not an object
Code: 0

Any thoughts on this.. ?

Ben


(This post was edited by phirschybar on Jan 14, 2005, 11:04 AM)


yermo
Novice

Jan 14, 2005, 12:02 PM

Post #16 of 66 (5230 views)
Shortcut
Re: [sleemanj] New Release: James' Unofficial Fork - Update 2 [In reply to] Can't Post

It seems that you are partially correct. I just tested HTMLArea-3.0 RC1 using the link tag and I'm able to at least hit return at the end of the line and have the link tag stop. The forked version behaves differently in that the link persists between newlines and there doesn't seem to be a way to stop it.

Also, in the forked version if you select a bolded section of text and try to unbold it, it does nothing. The same operation works in RC1 correctly.

----
update 4:15PM:

I think I've produced a test case .. it looks like if you have something like:

<strong><p> this is a test </p></strong>

you will not be able to unbold any of the text. Try selecting the "is a" and press the bold button.

However swapping the strong and p tags will allow you to.

-----------

I'm trying to crawl through the code to see if I can understand what's going on, however there are bunches of API's I'm not familiar with. What do you use for a browser javascript API reference?


(This post was edited by yermo on Jan 14, 2005, 1:19 PM)


sleemanj
User

Jan 14, 2005, 6:20 PM

Post #17 of 66 (5187 views)
Shortcut
Re: [mmcw] New Release: James' Unofficial Fork - Update 2 [In reply to] Can't Post

First, mmcw, can you edit your post please to break that long line.


In Reply To

I am tying to use my own toolbar order hoever then a few plugins will not work anymore??


I'll look into this, it must be to do with how ListType inserts it's buttons into the toolbar.


James Sleeman
PHP Programmer


sleemanj
User

Jan 14, 2005, 6:24 PM

Post #18 of 66 (5186 views)
Shortcut
Re: [Randyd] New Release: James' Unofficial Fork - Update 2 [In reply to] Can't Post


In Reply To
One thing. I've tried using the insert table but I haven't been able to make it validate as XHTML so I got rid of it. Same with the insert horizontal rule. Does your update correct that?


No. What doesn't validate about table?


In Reply To
I'd also like to be able to have control over table background and border colors.


I have some ideas to rewrite the table operations, but it won't be for a while yet.

Patches welcome :)


James Sleeman
PHP Programmer


sleemanj
User

Jan 14, 2005, 6:31 PM

Post #19 of 66 (5184 views)
Shortcut
Re: [yermo] New Release: James' Unofficial Fork - Update 2 [In reply to] Can't Post


In Reply To
It seems that you are partially correct. I just tested HTMLArea-3.0 RC1 using the link tag and I'm able to at least hit return at the end of the line and have the link tag stop.


Is this with the exact same set of plugins loaded? You wouldn't have the EnterParagraphs plugin loaded on one of them but not the other?


In Reply To
What do you use for a browser javascript API reference?


Mostly it's Geck Dom Ref,
Zvon.org's references, MSDN
and a good helping of guess work.


James Sleeman
PHP Programmer


yermo
Novice

Jan 14, 2005, 9:35 PM

Post #20 of 66 (5170 views)
Shortcut
Re: [sleemanj] New Release: James' Unofficial Fork - Update 2 [In reply to] Can't Post

For this test I'm using:

http://code.gogo.co.nz/htmlarea/examples/stylist.html

using FireFox 1.0 under Redhat 9.

Click <>
highlight all source and clear it.
Enter:

<strong><p>This is a test</p><strong>

Click <>

"This is a test" will be bold.

Highlight "is a".

Click the Bold toolbar button to unset it.

You will notice that it immediately pops back to bolded state; i.e. you cannot unbold the "is a".

However, if you change the above HTML to:

<p><strong>this is a test</strong></p>

It will work like a champ.

I have verified that the same behavior occurs under Win98 using FireFox 1.0.

Under some circumstances the editor seems to generate the <strong> tags around <p> tags which is how I found this particular problem. I don't know if it relates to other problems I'm noticing, but since it seems highlighting and state related I thought it might be the same code that's causing the link selection to behave the way it does.


sleemanj
User

Jan 15, 2005, 8:54 AM

Post #21 of 66 (5106 views)
Shortcut
Re: [yermo] New Release: James' Unofficial Fork - Update 2 [In reply to] Can't Post


In Reply To
Under some circumstances the editor seems to generate the <strong> tags around <p> tags which is how I found this particular problem.


That would be the problem, I'll have a look but I've not seen the editor create strong around p before. Hence why I wondered if you are using EnterParagraphs plugin (or maybe some other plugin that might generate that code) in the editor in which you saw it do so (wrap p in a strong).

Bolding and unbolding is a built in function of the browser, all we do is tell the browser that the person clicked the "bold" button, and leave it up to the browser to work out how to do that (and wether to unbold instead of bold). We don't even tell it what to bold/unbold, the browser works it all out.


James Sleeman
PHP Programmer


yermo
Novice

Jan 15, 2005, 12:03 PM

Post #22 of 66 (5100 views)
Shortcut
Re: [sleemanj] New Release: James' Unofficial Fork - Update 2 [In reply to] Can't Post

I believe this is due to the new behavior of wrapping blocks of text in <p> tags on ENTER.

Using the

http://code.gogo.co.nz/htmlarea/examples/stylist.html

sample, clear out all the contents.

Now press the BOLD button.

Enter the text "this is a test".

Now view source. You will see that it looks something like this:

<strong><p>this is a test</p><p /></strong>

Which would be the source of our problem.

I believe the insert <p> tags on ENTER behavior is causing problems in a number of selection related cases.

On line 2629 of htmlarea.js, if you call dom_checkInsertPremove on shiftKey (remove the !), the behavior seems better for this case.

However, looking throught the forum, I am inferring that <br> instead of <p> causes alot of other problems.

I noticed this post:

http://www.htmlarea.com/cgi-bin/forum/gforum.cgi?post=23794#23794

which seems to be observing the same phenomenon.

What's the reason for using <p> on ENTER instead of <br>?


(This post was edited by yermo on Jan 15, 2005, 12:39 PM)


eborn
New User

Jan 16, 2005, 8:04 AM

Post #23 of 66 (5040 views)
Shortcut
Re: [yermo] New Release: James' Unofficial Fork - Update 2 [In reply to] Can't Post

I'm currently experimenting with this fork, because the original HTMLArea isn't very stable for daily use.

But it seems the fork has at least one big issue that keeps me from using it. I use the following DOCTYPE on top of every page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

But with this DOCTYPE, IE 6.0 doesn't like HTMLArea and shows all sorts of errors.

It also happens when I put the DOCTYPE above the existing examples.

Is this a bug?


sleemanj
User

Jan 16, 2005, 8:32 AM

Post #24 of 66 (5031 views)
Shortcut
Re: [yermo] New Release: James' Unofficial Fork - Update 2 [In reply to] Can't Post


In Reply To
What's the reason for using <p> on ENTER instead of <br>?


As I recall, that was introduced in the official HTMLArea mostly because some people, who switched between IE and Mozilla often found it a problem that IE does <P> on enter, and Mozilla does <BR/> on enter. Plus the fact that <P> is the correct way of doing it and Mozilla was plainly braindead in that regard.


In Reply To
dom_checkInsertPremove


I havn't looked at this function before, actually I don't remember seeing it in there, yet, there it is.

I have taken a look at that now, it seemed to be trying to do the same thing as EnterParagraphs, but it didn't really work very well. I don't know why this function was added (it's in the official CVS, I didn't add it), I can only presume that it was better than EnterParagraphs for some reason.

Anyway, as I said it didn't work very well - so I've rewritten it, VERY EXPERIMENTALLY, I don't know if this will work properly in all cases or not, it probably needs some tweaking. I'd really appreciate if you could try it out

Go experiment with it. (click)


James Sleeman
PHP Programmer


sleemanj
User

Jan 16, 2005, 8:38 AM

Post #25 of 66 (5027 views)
Shortcut
Re: [eborn] New Release: James' Unofficial Fork - Update 2 [In reply to] Can't Post


In Reply To
But with this DOCTYPE, IE 6.0 doesn't like HTMLArea and shows all sorts of errors.

It also happens when I put the DOCTYPE above the existing examples.


It actually throws javascript errors with the doc type? Wow. Layout bugs I might have expected, but javascript errors. Wow.

I'll see what an be done.


James Sleeman
PHP Programmer

First page Previous page 1 2 3 Next page Last page  View All
 
 


Search for (options)