widgEditor: A simple, standards-compliant WYSIWYG HTML editor

There's quite a few HTML-based HTML editors out there, but they all lack something. Most of them are
fairly code obtrusive – requiring you to carve out a hefty chunk of HTML/JavaScript in order to
get them to display – or the outputted code is hardly standards compliant.

HTMLArea is probably the most
well rounded solution, but it's far too complex for most of my applications – its code isn't
extremely extensible, the interface isn't customisable, and inherent with its abundance of editing freedom
is the risk that an unwise author will produce a horrid looking mash of <font> tags.

Kevin Roth's Rich Text Editor brings in a bit more
simplicity, but the source code is again pretty messy, and the ease with which it is applied to a page isn't
great.

I've kept it to a minimal functionality set – the sort of styling that you'd require for a weblog
or CMS. However, the object oriented code is easily extensible should you be adventurous enough to
want to add on extra doodads.

The key to my implementation is the ease with which the widget is installed. Just put in one line
of JavaScript at the head of the HTML page, attach a class to whichever textareas you wish to convert,
and they're converted! Style the interface purely through CSS and configure all the options in one
place in the code – right at the top.

All of these types of editors rely upon the editing capabilities of the browser. Thusfar, only two
browser manufacturers have HTML editing available. Thankfully they're probably the two with the largest
market share – Internet Explorer and Mozilla. If you're using anything else, you'll just get the
downgraded textarea. (As you will if you don't have JavaScript, either.)

You'll see that I'm now using widgEditor for my own comments. I figure that's the best place to road test it.
I'm sure that the code will be hammered over the next few weeks, and found a little wanting, so updates will
be forthcoming as bugs appear.

Update (2005-01-28)

I've redone the submission parsing, so now there shouldn't be any problems with overlapping tags, orphaned
text, etc. How? I removed some dodgy regular expressions and used full DOM checking to ensure that elements
were where they're meant to be.

You should also be able to view the HTML source now. (Don't make untested code modifications at 4AM ... or ever.)

Problems with the toolbar coming up and nothing else in Safari shall be fixed; I have a rough idea of
what's going on, but need some solid AppleTime. However, when it's done you still won't get the editor –
plain textarea for you, until Steve Jobs does something about it.

Update (2005-01-30)

Textareas with multiple classes (i.e. other than "widgEditor") are now found and converted.

Mozilla's <span>
formatting for italic and bold are now converted to <em> and <strong> respectively when the HTML source
is viewed and when the form is submitted.

Multiple textareas on the one page are now supported. Some trickery was required because of some weirdness
with the DOM and quickly replacing several elements on the page, but it does work!

Improved text styling in Mozilla. Previously it could not remove <strong> or <em> tags. This was
fixed by using spans whilel in WYSIWYG mode, but seamlessly converting them to semantic tags for all other
purposes, including final output.

Hyperlinks can now be removed by clicking the "Hyperlink" toolbar item when a hyperlink is selected.

The addition of entries to the browser's history is not fixable. This is a side effect of
using iframes (necessary for Mozilla), and can therefore not be counteracted.

To be added: insert images, clean pasted content.

Update (2005-02-17)

Fixed Safari no show bug. Safari hasn't implemented HTML editing, but they have the hooks to do so, therefore
detection of HTML editing returns true. Had to hack around this.

Update (2005-02-28)

Insertion of images has been added. If you ask me, putting images inline with text looks crap, but
each to their own.

When content is pasted via ctrl-v it can now be cleaned. By default, widgEditor asks you whether you wish
to clean the content, but by changing the widgAutoClean variable in the configuration to equal true,
cleaning will be done automatically.

5/269

Gives a JS error while the page is loading in ie4.01 (win) on line 193 char 3, "Syntax Error"

What? No ie5.01 support? Degrades fine :)

Works in ie5.5 (win)

Works in ie6 (win)

Works in ff1.0 (win)

Don't have a Mac handy to test with.

If I could have one wish, it would be that the "B" and "I" buttons somehow kept state when they're in effect (alternate 'depressed' images or a change in border style or something). Wish or not, Great job!

I really like the semantically correct code, the minimal but sufficient options my sort of "hardly computer literate" clients would have, the CSS contextual control which is inherent here, and the minimal effect on page complexity (rider: I don't know all the other contenders, but the code I've seen in a few looks a mess of <font> tags, etc.).

Looks good. Looks good.

13/269

i have the same disappearing mac ff issue noted above... i've used kevin roth's in a couple of webapps and have found myself wrapping it in a php object for getting it into the page. i did have to re-write some javascript to get it to behave more or less the way i wanted it to, but it has worked fairly well. i just re-format the html on submit to make sure changes get tracked correctly. it likes messing with white space.

looking forward to seeing how you tackle the img and object tags. :-) still working that one out for compliant markup with a fairly easy-to-use (but light) dialog.

16/269

Well, there are a couple downsides to most of the editors out there, such as HTMLarea and whatnot, and that is that they are built around microsofts crappy editing functions... they also cannot get around mozzie's 'nope, can't paste content here, security risk' without changing the user configuration.

Now. Xstandard! - That's what I'm talking about... It's not crossbrowser, of course, windows IE/Mozzie only, but it has more goodies than you can shake a stick at...

Course, it's enterprise... but meh.

-Ryan

17/269

The interface is really nice. Very simple, clients could deal with this quite easily. My only issue (which has already been mentioned) is the odd nesting of paragraph tags. I also selected a line of text in the middle of some jumble and changed it to Heading 3, and the <h3> was inside a <p>.

But once that's sorted out - very nice work!

18/269

Nice little app, hope to see more developments such as image, colours, etc.

Only thing I'd like to know is it your page, or the code your script generates that goes against the XHTML verification? Trying to verify your page fails on a fair few points, all of which point to the comments. Just a minor point...!

22/269

23/269

Raymond commented on 28 January 2005 @ 02:42

The MSHTML control has not been updated in years. Let it die. I use XStandard Lite, it free and it's standards compliant. For those who care about Safari, I hear a Mac version of XStandard is coming although I am on Windows so it doesn't affect me.

24/269

I'm sure that XStandard is a great program, Vlad (one of the developers) hawks it a lot on the Web Standards Group mailing list.

However, I've never used it. Why? Because I have to download it separately. This doesn't make it viable for weblogs, etc. where people visit randomly, maybe to only view one page, and don't have a vested interest in installing plugins or the like.

26/269

[24]: I agree really much. I don't like downloading anything either. I have used KEVIN RTE, but its cose is messy as you have mantioned.

[25]: That happens with most of the editors. The workaround is: press cursor twice after the link end (last letter), moving to the right, then once left. Start typing. It should be normal text without link.

28/269

Re: Comments #14 and #18 wrote: > Do you have any plans to > implement colors?

This would defeat the whole purpose of making it standards compliant. Colours should be handled in your stylesheet! If you assign different colours to different headings, you will get your different colours, only it will be controlled so that you can keep a consistent look and feel. As it should be.

Keep fiddling and troubleshooting Cam, it's early days but this is a winner and I look forward to seeing it robust and ready to take the world by storm!

Funny, the ' and / keys are functioning fine this time round. A one-off gremlin?

29/269

I also have to praise XStandard. Yes, it does have two major drawbacks: It's Windows only, and you have to install it.

However, I've found it to be the only one that reliably handles the differences between the two browsers.

For instance, this control, in Firefox, adds a BR tag on return, while IE adds a P tag.

That's not to belittle this editor. It's VERY nice and I'm glad to see another 'simpler is better' approach to the problem like this.

I wonder why we don't see more Flash based tools? I think XStandard took the right approach by controlling the logistics of the editor themselves rather than relying on the browsers. Flash would seem to offer that benefit, but also add the benefit of being cross-platform compatible and not dependant on a custom install (outside of the flash plugin).

31/269

Hey hey very cool - it's nice to see an RTB where the code is actually legible (and therefore hackable!).

I have a question though: Is the magical property designMode the only way to get rich text editing to work? I was looking through FckEditor and it seems (emphasised because that thing's code is absolutely monstrous to read through) that they actually capture individual events inside an arbitrary element and then insert content based on that (i.e. you press "a" and it will add "a" to the innerhtml of the editing container - the caret and cursor are faked). It would seem that this would allow them to support many more browsers then just Moz/IE (but they don't). Actually, even if that isn't the case I'm wondering how feasable such an aproach would be.

And sort of off-topic but related, if anyone can figure out how on earth they got fckeditor to have a custom right click menu I will give them an eCookie and an eHug.

32/269

i had a couple problems, first one was fairly simple to workaround but still a problem and that is if your textarea already has a class, adding a 2nd class of widgEditor doesn't enable the functionality. the 2nd problem i'm having is getting the widgEditor to appear for more than one textarea on my page

33/269

ok i fixed that by changing the variable used to iterate through textareas from i to itm since i seemed to be getting set to something like 17 after exiting out of widgEditor's constructor. I still only had 2 out of 3 textareas converting, so after some experimentation i rmade the code iterate through the textarea collection twice, and that worked.

35/269

I agree with you, Xstandard definately has it's advantages... And downloading the cab file is definately a downside... But I DO know there's a redunacy option, for non-windows/ie/firefox browsers... I mean, most of the others produce crap that has to be cleaned up with something like Tidy? Why not just write it once the first time.

Anyways, major, MAJOR kudos to this system we've got going on here... I'd be very interested to hear where this is going.

-Ryan

36/269

It's quite interesting, but there are still some fatal problems encountered with this editor, much like HTMLArea and Rich Text Area.

The problem is that it's much too presentationally oriented for any descent use on a web log. There's no buttons for strong, emphasis, code, kbd and other semantic inline elements; yet there are buttons for bold and italic included (which actually abuse span with a style attribute but that is no better than just the b or i elements.

There's also very few semantic block level elements, though it's good to see headings and paragraphs and lists. Though, there's a problem with nested lists, which should appear as a descendent of the previous list item, not a sibling.

Finally, there's no ability to set classes or ids without editing the source, though that would be a little more advanced than just elements so I could live without that.

40/269

As I noted at the top of this entry, there's plenty of editors out there that do lots of stuff. Lots of them do too much stuff. I find that most of the options they offer are superfluous -- colour, justification, fonts -- these are the sorts of things that most people use to make e-mails look terrible. Seriously, how much styling do you need to make a generic web page entry? We're not talking about designing pages from scratch.

Additionally, most of them aren't that easy to install or modify -- tinyMCE still requires you to put in a config string at the top of your HTML document, and if you ever wanted to make a simple change to the code, good luck. It's 98KB without newlines or comments (133KB with).

Sure, they're still good products, but they're not what I'm aiming to do.

I will have a think about some of the suggested features, but if they don't have any tangible benefits, then I won't put them in.

41/269

stylo~ commented on 28 January 2005 @ 17:57

I agree about the size and ease of others, and code inserted is often crappy. Itried fck and took it out.

If you add the two I noted, I'd be very happy with it. Just what I've been looking for. As-is I use my own little hackneyed htmlcode editor (not wysiwyg) to insert tags, or popup and ask the class name I want, which is then inserted via selectionStart, createRange(), etc.

EDIT: OK, I see now your editor replaces the span formatting with em and strong before submitting it. You might note that as I and lachlan I assume were checking the html and commenting on that. Just need styles and it would be pretty good!

42/269

stylo~ commented on 28 January 2005 @ 18:12

sorry for all the comments, but maybe you could move that span and other cleanup code into the main function(s) so it is done automatically, not when submitting?

Also, why is it taking so long to switch between wysiwyg and html? What is it loading? I would have thought you could just show and hide each and and use innerhtml or such to synch the contents? (I also lost all the contents after a few switches back and forth. Happened a few times.)

43/269

Yoyo commented on 28 January 2005 @ 18:24

Good work.

Today I tested it and: - view sorce is working (IE/Firefox) - spans replaced with em or strong - multiple fields with class="widgEditor" not working - using firefox I coul not make bulleter list in this comments box - I went to top of page ;((

At the moment I'm using modified RTE, because it was simplest cross browser editors. Now seems that this editor could be better, but there is still lot of work on bugs (not new features)

44/269

Very nice tool. It works wonders on these comments - Howver, it would be cool if the images changed to let you know what button was selected (so you could know if you turned itallic back of without having to type something.

45/269

I hadn't realised you were replacing the bold and italic formatting with strong and em when submitted, though I don't know why you don't just add strong and em to begin with. I'll take a look at the code later on when I have time, and I'll see what I can do about fixing it up.

46/269

'tis a good little mover and there's no doubt. but, it would be nice if paragraphs were the default and not br tags. i think it's particularly sweet the way you can add headings and the like could make web editing for novices a breeze.

Also when you press return twice after a heading, it should revert back to p tags and not br's inside the heading tag. Those changes would make it idiot proof and valuability usuability commodity. keep up the good work.

47/269

Ross commented on 29 January 2005 @ 01:47

I like the simple approch, hope you can keep the focus and avoid the bloat.

Not sure if it's possible, but it would be great if it could leave code untouched (eg php code)

50/269

I built a site using a Textile type solution so that any user should be able to mark-up text. But, the client found out about these WYSIWYG editors and demanded we have one on the site. I warned him that not every browser could use it and the code it produces isn't always that great. Still, he had to have it.

So, I've been spending ungodly amounts of time creating an editor that degrades to a simple textarea that uses Textile like markup. When a user submits the form I have to check to see if they were using the editor or the markup, fix the code if it was the editor and then do all the database saving, etc. If they're editing an existing document, I have to check if they're editor capable, un-markup the text if not or leave it be if so. When un-markuping (real word?) I have to take into account that the code produced by the editor and produced by the mark-up class doesn't really match, and thus have to account for whatever possibilities may come up.

It's a pain in the rear, to say the least. A simple editor that produces clean code would be a dream! Long story short, this is a nice start you have. Good work!

Oh, and editing the style of it all was wonderfully easy. Here's a quick Firefox-esque theme I threw together while playing:

51/269

Not really much to say except that I like the unobtrusive nature of your installation.

I'm using FireFox 1.0 and don't see the viewsource button - and nor do I see the right click menu that someone else mentioned.

Anyway, I really like what you have going here and look forward to its more stable release.

I currently use RTE in a project I am working on. I wrote a ColdFusion wrapper for it so installation is pretty easy. However, I am always eager to try out things that can lead to greater standards compliance.

Thanks for working on this.

52/269

XStandard is a good product, but it is a plugin, and in some cases it provides too much control. I think you're on a winner here in providing a simple interface - there are lots of complicated ones on the market already - we don't need another one.

There's maybe one one other button I'd think about including, and that's "insert image". Other than that I wouldn't put too much more user controls in.

54/269

Regarding multiple textareas, which is a must-have for me as well,the problem seems to lie in widgInit(). Essentially, the problem wasthe theTextareas.length changes as you replace them. Also, the ivariable seems to change in unexpected ways.

Also, I've added buttons to enlarge and shrink each area, which is always handy.

Feelfree to use the code/graphics if you like. If you decide to use thecode it's probably best to do a diff, as I may have changed things hereand there. Also, I'm no JavaScript expert, so look out for silly bugs :)

Thanks for creating widgEditor, Cameron. I've been looking for something like this for quite a while.

Excellent work!

55/269

Jeroen Sen commented on 1 February 2005 @ 00:07

Thnx, for investing time Cameron! I have been looking for ages for a WYSIWYG - html editor with only these features, one word -> GREAT!!!

56/269

Lars commented on 1 February 2005 @ 01:14

Nice try, but is it truely possible to make something small that works on all platforms the exact same way ?

I don't think so...

That's why all well known wysiwyg editors are such a big mess.

IMHO the best way to get things small (speaking only of an admin interface with some features, not speaking of a small comment interface) is to code only for one browser...

By the way, I found a small bug : when you convert a line from P to H1, the italics and bolded text are lost.

2nd bug :When you use widgEditor in Firefox, and type ENTER, the P are not made automatically.

Good luck anyway in the cruel world of wysiwyg editors ;)

57/269

Another problem: using Firefox on Windows XP, when I hit the "View Source" button after making the original content entirely non-bold, I get to see the original source. When I then return back to WYSIWYG view, the original sentence and markup are back. Very annoying.

For the rest, it's quite a decent WYSIWYG editor. Good job :)

58/269

JJ commented on 1 February 2005 @ 06:06

It still got problems with nesting tags: too much tags, a matter of too much tags, but all WYSWYG-editors have this problem (HTML-tidy would be a solution?). Sometimes it becomes even impossible to 'un-strong' a part. Have a look at TinyMCE, still the best one I came across.

59/269

Ray commented on 1 February 2005 @ 08:02

Hi

Just want to say - keep up the good work. It's fantastic. There will be bugs, but it seems that there are a lot of people ready to support you.

72/269

widgEditor getting some play over in the blosxom world. Thought I'd let you know that I replaced the textarea in blosedit with widgEditor and turned some blosxom folks loose on it. They quickly noted the Safari missing textarea problem, but also noted a couple other things:

content is sometimes lost when toggling between HTML and WYSIWYG mode

widgEditor adds to the browser's history, making the back button harder to use

73/269

74/269

It's a good & simple editor , yet it has a feature ,common to many editors I've seen , that in my opinion it's a bad one.

After you type something and then delete all the text then the html code shows something like this <p>&nbsp;</p> insted of nothing.

75/269

metaphaz commented on 11 February 2005 @ 22:32

Nice... I'm occasionally loosing text upon switching to html view here on firefox (I think this particular problem only effects moz browsers) added timers at various points to attempt to alleviate the issue, but nothing worked so far. Anybody have any luck with that!

Possible perhaps to replicate the text in a "backup" of some kind.

76/269

Chris commented on 12 February 2005 @ 01:05

Hi! I really like the script but I have one major problem. My form don´t submit when I´ve entered a certain amount of characters. No errors, it just doesn´t submit. And I´ve checked that all functions returns true. I´m clueless!

79/269

80/269

Ray commented on 13 February 2005 @ 07:53

Works perfectly in IE, but can not get it to work in Mozilla. Displays fine, but when I submit a form, everything gets stripped out and nothing gets added to my database (my server side valiadation picks up the text area as empty).

Anyone else having this problem?

81/269

I love it, love it, and love it... There are a couple of small glitches but you have done a fantastic job, one thing that I am finding is the iframe is flashing when I hover over my sidebar navigation even though the sidebar is a completely separate entity, it somehow seems to be interfering.

It's a fairly simple menu using unordered lists and CSS hover states.

This is only a problem in FF1.0, no probs in IE. Any suggestions as to why this would happen.

91/269

Is there any way in Firefox to remove the <br /> at the end of the last <p> tag?

Is there any way to make Enter default to a paragraph instead of a break?

In IE when I past in text from Word it asks me if I want to clean the html. When I say OK the html comes out like <p class="MsoNormal"><font face="Times new roman" size="3">This is a <u>test</u> to see what the <b>WYSIWYG</b> editor does with Word <i>pasted</i> into it.</font></p><p class="'MsoNormalstyle="MARGIN:'" <strong the what see to test a is 0pt?&gt;This 0in>WYSIWYG</strong> editor does with Word <em>pasted</em> into it.</p>

instead of:

<p>This is a test to see what the <strong>WYSIWYG</strong> editor does with Word <em>pasted</em> into it.</p> that Firefox creates.

When select the image button it asks for the "Location of the image". If I select cancel it still asks me for the alt text. Shouldn't it cancel and shouldn't I get an error if I don't type in the location?

I noticed that you're not providing any more features. I would really like to see blockquote added. Actually I would like to see common elements like sub and supper script, and inline quotes added too. I'm really looking forward to version 2. You've done a wonderful job.

92/269

What I'd like to see: * Better <br /> stripping in Gecko * Better empty <p> stripping * A few more tags in the "change block type" box, eg <blockquote>

93/269

Andrew commented on 3 March 2005 @ 06:27

Great Tool! Just one issue (isn't that always the case?), I originally added a toolbar button for Strike Through, which I find to be very useful when editing text. I can still add the button, but because the system strips out span tags, and to add a strike through the system uses <span> when I save or switch to HTML it gets stripped away. Even if I add the <span> tag in the code view it doesn't stick. I also noticed that if you paste in code with any span tags in it - it also gets stripped out. This makes it hard to really use CSS to style the text. Thanks for the great tool, it has really changed the way my work flow and the way I organize myself. Cheers.

94/269

George Payne commented on 4 March 2005 @ 12:28

One troubling side-effect in Firefox/Mozilla is that redirects are broken by widgEdit. Eg, if you go to a page with widgEdit, then go to any page on the same site with an http-equiv refresh, it will not work. Very odd. Related to iframe history issue?

96/269

I'd like to customize this script (especially since it's no longer being updated, just maintained) but am running into trouble modifying/adding buttons and select boxes. I'm having similar problems as the one mentioned in 130. I additionally tried putting "variousblockelements" instead of "<variousblockelements>" in the widgSelectBoxOptions but that just caused other oddities.

Anyone got any pointers?

97/269

I added a <base> tag to the Iframe template (with a variable set at the beginning of the code along with the css variable). The reason being that in my website the admin area (and therefore pages using widgEditor) sits in its own admin folder. This means an inserted image won't display if you use a relative url.

100/269

Here at my shop, we also need something that in addition to correcting the dreaded Word CrapTags™ will also clean up the even-more-dreaded CP1252 Crap Characters™. That will be as simple as a series of RegExp replacements of the form

pasteContent.replace(/\u0097/g,"&#8220;")

I'm working on adding that in now. Do you want me to send you what I end up with?

101/269

102/269

The Microsoft CodePage 1252 (Windows Western) character encoding improperly uses most of the reserved control-character code points in the range 128-159 to represent certain typographical symbols and other special characters. For example, the codepoint 151 (which would, again improperly, be represented as an HTML numerical entity &#151;) displays the em dash character. The correct named HTML entity for this is &emdash;, but even that doesn't get rendered properly in some browsers. Other offending characters that are very frequently imported in cut-from-Word, paste-to-IE operations are the curly quotes.

The solution, I've found, is to replace each instance of an offending character (i.e., one represented by a code point in the "forbidden" range) with its HTML numeric entity. This is easily done with regular expressions, and that's what I'm working up now. Since you're offering widgEdit under the GPL, I'll gladly offer it as a patch if you want it.

103/269

The best of the sophisticated editors is WYSIWYG Pro which I've used for some Mambo installs. It costs a little money but is very good value (about $50/site, which is fine for commercial installs).

I tried HTMLarea, Rich Text Editor, tinyMCE and none of them were easily customisable and/or provided the ability to strip functionality. tinyMCE was the most elegant but meant that every page was carrying lots of extra baggage and any time HTML code was pasted in it was stripped of essential tags. Rich Text Editor was too difficult to customise and too ugly. HTMLarea was just a mess.

As soon as anyone has widgEditor working in Mambo, let me know as I would like to give it a whirl.

The biggest downfall WYSIWYG Pro has is with Javascript. It's better now but has a tendency to mangle it.

Thanks Man in Blue.

104/269

George Payne commented on 23 March 2005 @ 07:26

Just FYI, I've submitted mods to mvnforum to include widgEditor as an optional editor. The developer says the mods may be in the GA release. It suffers a bit from the Mozilla redirect issue I mentioned above, but I think widgEditor makes a pretty nice addition to the forum. See mvnforum.com if you're interested.

105/269

Great script. I'm digging Matt's WordPress plugin. I think I found some small bug in the widgEditor, though: when editing text with entities in it, then viewing the HTML source, the entities aren't translated to their HTML code.

106/269

I'm also interested in widgEditor's integration into WordPress, but I've noticed that lists are still not always valid XHTML.

Steps to reproduce:

1) Create three lines:

item1 item2 item3

2) Select all three lines and click the "list" button

3) Select the middle item ("item2") and tab it over (which should make it a child of "item1." But if you examine the code it produces, "item 2" is contained within a UL that is a direct child of the top UL, instead of being a child of the "item1" LI.

107/269

you'd rather use, if you still want to force a new window (anti-ergonomic but...) <a href="blah?styles=false" onclick="window.open(this.href); return false;">blah</a>

which can be achieved with some regular expressions *after* the user has submitted his content.

108/269

Thomas commented on 28 March 2005 @ 07:08

Thanks Thibaut!

109/269

Tom commented on 29 March 2005 @ 05:38

Is anyone else out there having difficulty with widgeditor and Firefox 1.0.2 on the Mac?

Works great in FF 1.0.2 win and IE 6 Win, but seems to hide the content of my textarea about 1/2 of the time. If you submit the form at this point, of course you lose all the content.

We didn't see this behaviour with FF 1.0.1. I'm not a javascript wiz by any stretch, so any assistance is appreciated.

110/269

Tom commented on 30 March 2005 @ 05:03

Regarding my earlier post about firefox 1.0.2 problems, it looks like I had something corrupt in the profile. Starting clean with a new profile and it all works groovily.

Great little editor. :)

111/269

Crowdog commented on 31 March 2005 @ 08:00

I'm having the same problems as Tom (comment 168-169). Firefox Mac is causing widgEditor to drop the text that's in the textarea when it loads. Unfortunately I have no idea how to "start clean with a new profile" because I can't find any reference to profiles in Firefox at all. How did you create a new profile?

Also, I'm just now noticing a new problem - every time I type an apostrophe, FF's search bar opens and puts a cursor there so the next character I type, FF starts searching the document for. Annoying!

112/269

n/a commented on 1 April 2005 @ 01:28

Firefox profiles: http://kb.mozillazine.org/Profile_folder

113/269

Ryan commented on 2 April 2005 @ 09:14

I'm having some problems with the editor using Firefox for editing stuff.

basically I set up the text editor then put

" echo $contents;" in before I close it up (i'm doing PHP)

The Contents go in ok but whenever I submit the code it appears to be blank. It works fine in Internet Explorer. Is it a firefox problem or a widgeditor problem?

Otherwise it's a brilliant product, the best I've ever seen at being a nice simple content editor suitable for launching at untechnical people. Thanks.

118/269

Great script - thanks. Just installed latest version of Safari (v1.3) and noticed that the widgEditor toolbar now appears, but still doesn't work (I think - haven't tested it properly yet). It might be that your code simply needs a bit of tweaking.

119/269

Another quick question; I'd like to set the font type and size displayed in the text area, like you have on your example page (rather than have it default to Times), but I can't seem to find the right CSS class. I thought it might be something like this:

.widgContainer textarea.widgEditor p { etc...

Doesn't seem to work though. I'm sure it's a really simple solution. Can you help?

120/269

Styles for the content contained in the editor are contained in css/widgContent.css.

If you wish to change the location of this file, the directory path can be modified in the config variables at the top of the widgEditor.js script.

121/269

Dan commented on 20 April 2005 @ 07:37

I don't think any one has mentioned this bug yet, but I'm not sure.

I can't exactly figure out when this happens, but for example, on the: sample page in WYSISYG mode, if you highlight the sentence, then make it bold and italic, and then submit, the bold and italic formatting is lost.

125/269

Okay, this is brilliant. I will be using this with Safari/Firefox in a PHP development environment. Here's my feedback:

1) If the original textarea's name is in php-array-parsable form (e.g. name="content[user][description]") then the additional sanity-check element added around line 241 causes a conflict, and overriding, of the document's value because the name is "content[user][description]WidgEditor" . Php interprets this as the same as the original and overrides it with the text "true". Removing that line (241) fixes it and seems to have no adverse effects).

2) Safari (yes, it works in the new Safari) doesn't properly execute some javascript on submission. Instead of wrapping the text in <p></p>, it wraps it in "function (match) { return match.toLowerCase();.....".

So you might want to look at that.

3) On line 594 (detectPaste): Does ctrlKey function the same for a Mac (which uses "command", not "control")? I don't know enough js to tell, but you might want to add some if it 's different.

4) Did I mention this is brilliant? It is. You are a genius. I'm going to customize mine to add underline, superscript, subscript, strikethrough, and keyaccess support for the buttons.

126/269

The bug in Safari 1.3's output is due to the fact that it has incomplete support for JavaScript regular expressions. I'm trying to figure out a way around it at the moment.

127/269

Sean commented on 29 April 2005 @ 01:32

Does anyone else have this problem using FF on Linux where all of the Widg content jumps out of the box -- kind of flickers a few hundred pixels away from the box, then settles in? This happens when the page first loads and also when ever I do any edits with the toolbar (such as click the 'bold' button). Anybody else?

128/269

Brilliant piece of code!! I am now a complete Javascript convert! (Who'd have thought it was only good for rollovers!?!?)

However, I've tried to use it on a secure page and i keep getting a 'there is insecure content on this page - do you want to display it?' message. I've converted all the URS to absolute secure urls i.e. https://, but it doesn't seem to make a difference. I've narrowed the problem down to the generation of the iFrame (i think ;o) ).

129/269

No, don't know any way to get around https:// & iframes, though I haven't tried.

I'd assume that anything with an iframe in it would probably set off an alert, as it might be possible to circumvent the secure protocols with them.

130/269

Sean commented on 29 April 2005 @ 11:33

Oh no really?! So does that mean that as soon I put this stuff I'm developing on an SSL secured page, the user will get SSL warnings? Am I missing something here because this seems like a really big problem, no?

Also, if anyone has any ideas about my post above (#127) with spastic content, I'd be most grateful!

131/269

If anybody knows of a workaround please do let me know. It seems the iFrame is generated dynamically, how about if it was pre-made and referenced through https?

Is there any alternative to the iFrame?

132/269

Aaron commented on 30 April 2005 @ 05:30

I am having the same problem with firefox and the spastic content.(post #127) In IE the insert image feature seems to put the image in the top left corner after inserting it, not into the textbox(sometimes).

133/269

134/269

Any chance we could talk you into (or help you) setup a forum? It would only need a couple of categories, maybe 'general discussion', 'installation issues', and 'support issues'. The thing is, I think a lot of questions on this board would have a much better chance of being seen (and maybe answered), if there were threads for each topic. For example, I've been asking about the spastic Firefox thing, others have talked about HTTPS issues, and Safari support seems to be a new hot topic. We need threads man! I'll help! sean - nospamplease - datafly -dot -net

137/269

In regards to the spastic content, I have had this as well (only in Firefox on Windows XP) and only when the form is set to float in CSS, removing the float fixed it; so could that your problem?

In my case the spastication occurs when typring in a paragraph or header format but, if I am typing a list, there is no problem whatsoever.

138/269

Aaron commented on 3 May 2005 @ 10:50

Has Anyone an issue with IE where upon inserting an image the image is inserted in the top left corner of the screen, instead of into the textarea? It works fine in firefox. Thanks.

139/269

Aaron commented on 3 May 2005 @ 11:35

Ok I apologize for posting on this page so many times with questions, this is not really a forum..but I narrowed down the problem to when inserting an image in IE if the widgeditor does not have focus (the user has not click in the text box) then the image in the top left problem occurs. I a way to give the focus to the textarea upon clicking on the insert image button Thanks

140/269

[SOLVED!] About the spastic content problem in FF, as soon as I got widgEditor out of its CSS float elements (as suggested above), the problem was solved. In order to keep my CSS layout, I just edited the widgEditor.css and set a big left-margin to make room for my left-side navbar. I think this workaround will work for anyone having this problem.

141/269

Chris Mc commented on 3 May 2005 @ 20:26

This is exactly what i have been looking for. I was having troubles with people pasting straight from word. Which was VERY messy. Ive changed the code slightly so it doesnt prompt when someone copies text in.

Fantastic!

142/269

Hi There, i've been trying to fix the problem with 'there is insecure content on this page - do you want to display it?' message for a few days now. The answer is to supply a fake src attribute when generating the iFrame, I found the solution at the following URL

http://scott.yang.id.au/2003/02/page-containing-non-secure-item/

Basically you need to add the line:

this.theIframe.src = "blank.htm";

where 'blank.htm' is a fictitious page. Add it just after the line:

this.theIframe.className = "widgIframe";

You need to supply this for IE to think it's loading a page and stop hassling you thinking it's a non secure iFrame.

Hope this helps!

Rich

143/269

Just to let you know I'm using widgeditor at foopad.com and it's awesome. Thanks heaps for the great tool.

I've done a fair bit of JS development myself, so if you need some help with development - feel free to give me an email ( ben at ripcord.co.nz ) and I'll try and help out. I'll have a go at fixing the safari bugs over the next week.

Cheers, Ben

144/269

ChrisF commented on 9 May 2005 @ 23:55

I would really like to use the widgEditor in my project, but it seems to be disabled when using it on a modal dialog in IE (on Windows XP). Everything looks right, I just can't edit the text. Anyone else seen this or have any suggestions?

145/269

ChrisF commented on 10 May 2005 @ 01:47

Never mind. Google told me that design mode is not supported on a modal (why?) so I would have to simulate the modality.

146/269

Just would like to second the request to add compatibilitly for Safari 1.3/2.0 WYSIWYG editing to WidgEditor!

(Another fan of your very well-designed piece of software, especially without the feature bloat that makes other editors so confusing.)

Scott

147/269

ChrisF commented on 11 May 2005 @ 08:11

BUG:

When I typesome text and then make part of it bold and and adjacent part italics, the space between them disappears when you submit. This is because of the code near the comment: "/* Remove all text nodes containing just whitespace */". Why is that code there?

149/269

I also get that javascript cruft when submitting a form in Safari 1.3.

Also, in the latest nightly build of Camino (haven't tried in the current Stable), an empty widgEditor-enabled textarea won't allow input. However, if you switch to HTML-code mode, type something in, then switch back to WYSIWYG mode, it allows editing. It also works fine if the textarea is pre-populated with text.

Thanks Cameron for this fine piece of code! I use it on many of my client admins..

155/269

But I found a bug wich has to do with the element name of the textarea element.There must not be brackets like [...]!

Details: To get arrays from my form data in my php-backend I create names with brackets like [...] for my form elements. Creating the form and the transformation to widgEditor works: I can see widgEditor on my website but it seems, that the transformation "back" does not work: My former textarea element sends "true" and thereÂ´s no additional data from other elements: I cannot see data from widgEditor.

156/269

bobo commented on 19 May 2005 @ 09:41

""When typing text in the formfield the buttons above disappear or flicker constantly"

further to this issue, it seems that whenever I click in the textarea in IE 6.0.2, all the buttons reload. it makes typing in the textarea a challenge, to say the least.

157/269

Mathieu commented on 20 May 2005 @ 06:40

just reporting a problem I have, I dont know if its in the JS, or in my code, but sometimes (about 1/4 times randomly) the content of the editor disapear completly.

this happen, when the page load. I see everthing and then nothing when in finish his refresh.

I use the script from 02-28, with Firefox 1.0.4 on OSX

158/269

Frank commented on 21 May 2005 @ 01:21

Most features work just like a charm. But when editing the Source and adding the "lang" and "xml:lang" attributes and going back to WYSIWYG view they are deleted. However, when saving the page in source-view, they are saved, but only until you edit the page once again in WYSIWYG mode.

In Germany (where I am from) you need the lang-attribute with almost every tag, espacially <span>, <strong> and <em> ... would be great to be able to use it with widgEdit. Any ideas?

159/269

Peer commented on 24 May 2005 @ 08:21

hi cameron,

please don't stop the development of this great editor, he's the only one, i know, who build clean xhtml 1.1 code.

160/269

Sean commented on 25 May 2005 @ 13:52

Yes Mathieu (post #157), I've been having the identical issue. This is quite severe because if editor loads blank, then the user submits the form, it will submit the value as blank!!! (means people might accidentally erase all their content because of this bug).

It's such a serious problem that I've had to switch to another editor to avoid lost data for a Mac-centric client. We need Safari support, puh-leez?!

171/269

I've found a sort of solution to the Flickering buttons problem in IE.

I've commented out the lines 1335 to 1339 in the widgEditor.js file that loop through the menu listThis doesn’t seem to cause any problems, although I did get an intermittent error which I can’t replicate very well however this may be unconnected – I was pasting in large bits of text from word to see what happened.

I’ve checked it in IE6 on XP and Firefox and everything seems to work ok without these lines.

172/269

I noticed an issue with Mozilla and framesets when using widgeditor. Sometimes the editor doesn't render at all and sometimes it just won't render on refresh. If you view the page out of the frameset it works fine.

Unfortunately I'm forced to use a frameset for my current project - does anyone know a way round the problem?

173/269

jehoho commented on 21 June 2005 @ 00:45

I wanted to change widgEditor´s frontend to another language.

Instead of changing all these english hardcoded text in the code to text in my language I created an array for language settings in the configuration variables.

Therefore it is much easier for developers to change from one language to another without crawling through the complete code.

An idea for the next version?If you want to use the language settings change following in widgEditor:

I replaced javascript iframe generation with static iframe, pointing to a static html template. I also use body.innerHTML for updating, instead of document.write.

I didn't test it in Win IE yet, but Firefox on Mac seems to work just fine

176/269

Ksenia commented on 13 July 2005 @ 02:22

I had a strange problem with pasting text with fixed row width (content of plain email from Mail.app). The single breaks were replaced by paragraphs. The problem seems to be in the function acceptableChildren. It looks like breaks were somehow never accepted as an element, even when widgInsertParagraphs == true. Testing environment: Firefox 1.0.4 on Mac.

Anyway, the following patch seems to help. Replace line 1466if (!theChildren[i].nodeName.isAcceptedElementName())

177/269

The Dood commented on 15 July 2005 @ 18:36

Hi! Great bit of code there!

I am having issues with IE though - when it loads up, the text area - set to 100% overflows to the right (in other words, it seems to take up 110% of the screen). As soon as you resize the window, it fits to 100%. FF is fine. Seems like IE doesn't like margins and paddings around the text area, but I could be wrong.

185/269

Dave, it has to do with a delay imposed on refreshing of the content. At the moment it's set to 500ms( I think), after which time the content gets overwritten with a cached version.

However, because the image has to be loaded into the iframe, this often takes longer than the time period, so a discrpeancy occurs between the cache and the source.

It' a bit more detailed than that, but that's the general gist of it. If you change the delay to longer it should fix it for the moment, but when I get around to updating widgEditor this'll be one of the things I fix.

186/269

Aaron commented on 21 September 2005 @ 12:44

Dave, I had this problem Cameron told me To Fix the Problem look for

setTimeout in widgEditor.prototype.initEdit()

And Increase the number .. worked awsome.

I just like to say how much I like the Widgeditor, our Clients love it! I have added a few extra features with the help of some others, like image uploading , and increasing the text area size. Thanks again Cameron For this wonderfull application!!

187/269

Dave commented on 23 September 2005 @ 03:06

Quick questions, i have went through the code and removed all the sections that automatically put in the paraggraph tag, yet it still does it every time. How do I make it so the paragraph tags do not automatically appear all the time. Great app. by the way. Thanks, Dave

190/269

Hi I like the look of this editor a lot; am in the process of checking various ones out. One thing I'm stuck with, and prehaps this is a preferred behaviour that I haven't figured yet, but the editor seems to apply a fixed width newline character to anything that is inputted. Is there a way to turn this behaviour off (or is there something I'm doing that is causing this)? I'm using the Sept 2005 download in Mozilla Firefox 1.0

191/269

Andrew commented on 4 October 2005 @ 04:35

I am in the process of using widgEditor as a WYSIWYG editor for MediaWiki on our internal network. Everything works like a charm (with a few tweaks to MediaWiki of course). However, the only issue I am having is with the code output. For some functions of MediaWiki to work I need to add line breaks (new line) in the HTML output before and after headings, paragraphs, and lists. Not only does this make for easier to read code it prevents MediaWiki doing wierd things of it's own. While I know PHP quite well, I am a little lost with JS. How would I go about adding these line breaks to the HTML that is output to the database in MediaWiki. Is hacking widgEditor the best way to do this? Thanks for the great tool.

192/269

The best way to do stuff like that is to handle it on the server-side. i.e. change it before putting it into the database.

If that isn't possible, you'll have to write a regular expression to make the changes in widgEditor before submitting the HTML -- something you probably wouldn't be able to do unless you have some JS knowledge.

193/269

lala commented on 5 October 2005 @ 01:35

Hi, I'm submitting a form where this is used with Ajax. However, it does not send the description along to the server:

194/269

If you didn't have JavaScript enabled, widgEditor wouldn't have fired.

Using AJAX should be no different from submitting the form normally. However, the data in the iframe is written to a hidden input when the form is submitted, so you should make sure you're not preventing this action from happening e.g. by overwriting the onsubmit event handler.

195/269

lala commented on 5 October 2005 @ 17:05

Thanks for your response.

Offcourse i have to overwrite the onsubmit handler to send an AJAX request; onsubmit="new Ajax.Request(...)"; anything I can do about that? Can I call your methods manually? (What are they)

199/269

stu commented on 8 October 2005 @ 11:20

Hi again. just played a bit more with widg and it seems that only when Mozilla Firefox is used (doesn't happen with IE) the output has new line characters added at some specific width (perhaps the width of the textarea?). You see this in the example.htm if you 'check the submitted code'. I've tried adding 'wrap="off"' to the textarea but no luck. Any ideas on how to change this behaviour?

203/269

I've installed this great tool on our website and it works fine in IE but in Firefox I get duplicate edit boxes appearing and then strange things occurr when you submit any changes. An example page is http://www.proverbs31.com.au/trueBlue/calendar/edit.php

Does anybody have any ideas why?? I'd appreaciate any help.

204/269

Andrew commented on 26 October 2005 @ 00:00

A small bug! This seems to only happen in Firefox, and may be a Firefox bug however might as well point it out. When you select text in a list and apply any formatting to it, when you submit the information the formatting disappears (be it bold, italics, etc...). However, if you select everything in the line of text *EXCEPT* the first letter (apply the formatting) and then select the first letter (apply the formating) the formatting will stay when the page is submitted. As stated this does not seems to be the case in IE. And yes, I submitted the bug to the Firefox team too. Any ideas? Cheers.

205/269

This is a great editor. Great work. I've spent the last few hours trying to create an image upload area that allows a user to browse to an image on their own computer and have that load into the editor. I created my own camera icon (simply because I was using an old version of your editor before you included images) and when this is clicked it opens up another iframe that consists of a form to upload the image. That script processes the image using ImageMagick and passes it back to the WidgEditor. It works perfectly in FireFox, but not in IE. By no means am I a javascript expert so I'm guessing there's probably something simple I need to fix, but I'm stumped at the moment. If you want to try it out, please feel free to go to http://markschrag.com/widgetest and upload your own image. Any suggestions on what it would take to get it to work in IE would greatly be appreciated. Thanks again for your great work.

206/269

Ryan commented on 27 November 2005 @ 07:54

I tried that PHP to try and fix the broken </li> but sill no luck for me.

So all my lists look like this:

<ul>

<li>text

<li>text</li>

</ul>

any suggestions other than not using IE

207/269

Tom Hickey commented on 3 December 2005 @ 02:30

RE: post 198

I also see this issue in Firefox 1.5

It seems as though the issue is with calling getRangeAt when there is no selection. By adding a conditional around this call checking for the rangeCount you can stop the error from occuring.

Although this stops the error, when there is no content you are unable to click in the field to start editing. I haven't figured out how to get around this issue yet. (When there is content, everything works as normal.)

209/269

Have been trying to to set theURL var other than using a prompt -- for internal linking for CMS-type stuff, but am having a tough time passing back to the parent-- very frustrating, as all works but this one measly part. Could really use a basic tip. Thanks. randy at above domain.

220/269

Are there any plans on keeping thsi project alive from its owner? Clearly the best/easiest rich text editor out there, it would be a shame to see it not maintained to support new browsers (cf the FireFox 1.5 bug).

221/269

It'll be updated shortly. I've done most of it, just have to find the time to clean it up.

222/269

Florian Sinatra commented on 21 January 2006 @ 09:37

Hello The man in Blue. I'm one moreover who thanks you for this great job ! I wanted to use it in place of BBCode and make a Web interface to edit my site. But I come from Switzerland, where we speak French. I already made a traduction, but there is still no accents support. "é" will be parsed as "é" in place of an HTML entity "&eacute;". I am still a newbie in JavaScript and DOM, and I didn't found how to do that. I hope sincerely that a next version will support accents, because actually no one can use it in French.

224/269

225/269

Do you plan to add Smiley's and font colors ? I'm going to implement this , but at some point, I'd like to offer my users thos options

226/269

Daniele LR commented on 3 February 2006 @ 02:28

In the comment n. 166 ( 2 June 2005) Chris Mc asked:

"Basically i want to know how i can create a function to enter my own text into the editor."

I read all the discussion board several time, but i didn't find any answer to this question.

And i have the same problem: from a popup window, usually i refer to a normal textarea by:

window.opener.formID.textareaID.value

But this instruction doesn't work with WidgEditor.

Someone may help me, please?

227/269

Rand commented on 3 February 2006 @ 11:36

Nicely done!

What I need is a way to put my own tags in the picklist. Instead of six heading options, I need a custom one that assigns the block a div name that I can style in my css. And the ability to offer inline classes/spans the same way.

Is that impossible with this tool because it relies on the built-in editing tool in IE and Firefox? Or is there a way to define custom tags?

228/269

EPOX123 commented on 3 February 2006 @ 12:58

Does any one have a hack to open links in new windows ? :-) ?

229/269

EPOX123 commented on 3 February 2006 @ 14:25

had to do some php code becuase i could not figure out the code so that i could mod it but owell here is the php code for you newbies

230/269

Jean commented on 9 February 2006 @ 08:40

Dear man in blue,

not to be pushy or anything, but can you give us an idea as to when we can come back to this page and see the bug fixes you talked about implemented? Not asking for a commitment or anything, just an estimate.

Muchos respect, as always.

231/269

Thomas commented on 15 February 2006 @ 03:57

Hello THe man is blue,

Indeed WidgEditor is great, it is good you want to keep it simple! This is good programming.Just a little thing that could be usability wise. When we insert a link, if we click on the link button again, it erases the link. It would be nice if instead of doing thi, it pops up the insert link window with the url entered. Think about it, someone who is not confident with writting urls can be annoyed if the url can be updated.

That the only constraint I've found, this work is great, good luck with your other projects.

237/269

238/269

louis w commented on 10 March 2006 @ 02:27

i am trying to hack a popup image selector tool... just wondering if you can offer assistance in accessing the editor from a popup window. i am using your existing code for inserting image but can not get it to work. i have tried:

241/269

Peter Bex commented on 11 March 2006 @ 05:52

I got it to work under Safari (modulo some minor selection problems) by simply changing widgToolbar.prototype.addButton. Instead of hooking the widgToolBarAction to the onmouseclick action, hook it to the onmousedown action. That's it!

245/269

I have just found this awesomely simple editor tool and nearly wet my pants!!! This is EXACTLY what I have been looking for for some time! A really simple wysiwyg editor that I can give to my clients without worrying about them making a disgusting mess of the website!

As soon as I use this in a project I'll be making a donation -- no doubt!

251/269

Thank for you hard work, or perhaps it wasn't such hard work for you. This editor is a life saver. I reworked "HTML Area" to attempt to make it standards complient but I'm not a javascript guru, and I just ended up making myself cry.

252/269

I see in comment 120 that we're supposed to use the widgContent.css file to style the text within the textarea. I've tried, but nothing seems to affect it. What should I be doing? All I see is a style for 'body'. I tried adding a style for 'textarea' and '.widgEditor'. What am I missing? Thanks. And thanks especially for creating this free tool.

253/269

Antonie Potgieter commented on 29 March 2006 @ 12:33

How can I turn wordwrap on? I seem to have a problem with the width when it gets outputted.

255/269

When I enter <td><input type="text" name="firstName"></td> in the html editor and then go back to the WYSIWYG view, the input field disappears and I'm left with simply <td>

Any explanations?

Thanks,Rob

256/269

Eric commented on 1 April 2006 @ 02:45

I'd like to know how can I change the appearence of the editor. Like, I want to use single line borders (border-style: solid; border-width> 1px;) instead of the 3D look. I tried to edit the CSS, but the changes doesn't seems to get working. Any idea?

Thank you!

257/269

Aaron commented on 1 April 2006 @ 03:57

Re: Alex post 254

Check out posts 208 and 217 for a temporary hack to fix that problem.

258/269

Alex commented on 3 April 2006 @ 20:01

@ Aaron Post 257

Thank you Aaron! It works now!

259/269

I've been desperately trying to hack blockquote support into widgEditor, but as my javascript skills are mostly the copy&paste kind, i have not been able to get it to work. (well, actually, i did get it to work on Firefox, but not IE). Does anyone know of a way to support it?

260/269

Matt commented on 8 April 2006 @ 19:03

What the f**k is all that about!?

I want to ask a question about Widgeditor, but I see someone/company/thing has hijacked your comment section.

What I wanted to know is has anybody modified widgeditor to expand the 'add image' functionality. If using Widgeditor in a CMS you really need to be able to browse for a file and pick it. Let's face it, how many people know the exact url and file name of all the files available to them. Even if the actual image uploading were done on a different page could Widgeditor be modified so that the add image url window became a browse window? I don't know enough about javascript to know if this is a simple thing or not (I'm guessing it's not as someone would have done it by now - neither htmlarea or rte do this)?

261/269

Coby commented on 11 April 2006 @ 07:31

Man In Blue,Thanks for the very nice bit of code. I think you are on the money with the design premise. However, I will wait for the next release as I am having problems with:-FF 1.5 bug (yes, I saw the fixes but don't need it that bad)-Your check for Safari does not seem to work anymore since Apple thinks they support designMode

Hope to see the new release soon. Nice job.

262/269

ID commented on 12 April 2006 @ 03:10

hi Cameron, 1st of all many thanks for this nice and easy-to-install tool.

I noticed many comments already mentioned this but I'd like to point too, ability to apply ones own styles would be a great addition to this wonderful tool, in fact I'm considering to donate us$ 50 (I know not much but..) to have that function, styles with pull down menu applied to h*, p, span and div would be good enough for me, and a button for <hr> tag.thanks a lot. :)

263/269

Jason commented on 17 April 2006 @ 00:07

I tried to implement a 'center' button but I couldn't do it. Has anyone already done this or knows how to?

267/269

"The addition of entries to the browser's history is not fixable. This is a side effect of using iframes (necessary for Mozilla), and can therefore not be counteracted. "

I found a fix for this... In IE6 anyway.When you change the src of a dynamic iframe, items will be added to the history. However when you change the src of a static iframe it does not. So all I did was set a hidden static iframe with a src of about:blank on the page first and then clone it when ever I needed it for the editor. That way the history Doesn't change. pretty cool huh? It also fixes the ssl security warning too.

Popular Entries

My Book: Simply JavaScript

Simply JavaScript is an enjoyable and easy-to-follow guide for beginners as they begin their journey into JavaScript. Separated into 9 logical chapters, it will take you all the way from the basics of the JavaScript language through to DOM manipulation and Ajax.

Step-by-step examples, rich illustrations and humourous commentary will teach you the right way to code JavaScript in both an unobtrusive and an accessible manner.

About this site

The Man in Blue is the alter ego of Cameron Adams, a Web Technologist in MelbourneSydney, Australia. (That means he does graphic design, HTML/CSS, JavaScript, writing, server-side jiggery pokery, and anything else that takes his fancy that day.)

Cameron has been designing graphical/informational/software things on and off the Web since 1997. You can see more of Cameron's design work on his portfolio, and if you're interested his services are available for hire.