Whizzywig FAQ

Frequently asked questions

Is Whizzywig really free? Why?

Yes. See the licence. It will always be free. You can even use it your commercial projects.
Because open source software is a good thing.
Because it's harder than you think to make a living selling software.
And because one day you might come back here for something that does make a living.

If you'd like to say "Thank you":

Can I put more than one Whizzywig on the same page?

Yes. You can create multiple areas on a page that can then be edited by a popped up whizzywig window. See the Multiple whizzywigs demo. View the source of that page to see how.

Why doesn't Whizzywig work in Browser X?

Because Browser X does not support designmode on iframes. That means whizzywig does not work in a lot of really old stuff and user will see a plain textarea. The vast majority of users can run Whizzywig in their web browser. Recent versions of all support Whizzywig. If there is anybody left trying to use Internet Explorer on the Mac, then they should wake up and join the rest of us in the 21st century.

Why can't I get to the next line by pressing Enter?

Because it's standard Microsoft behavior for Enter to create a paragraph break. In Internet Explorer, If you want a new line without a paragraph break hold down the shift key:

Simply pressing Enter...

…gets a new para. But pressing Shift+Enter...
…gets a line break without a new paragraph.

This is the same as Word and other Microsoft applications.
Note that Firefox users always get a line break on Enter.
To turn lines into paragraphs in Firefox, select the text and select Paragraph from Choose Style:

Why so few fonts?

On your computer you have many more fonts available that the ones listed in the Whizzywig pull down. Sadly, very few of them are reliably available on everyone else's computer. What's more, not all fonts are 'browser safe'. Symbol fonts like Webdings (Webdings) are not displayed in many browsers.

How do I add/delete rows or columns in an existing table?

It depends on whether you are using Internet Explorer or not.
In internet explorer, with the cursor in a table cell, click the table button. You will see a new toolbar with buttons to add/delete a row or column.  If you are not clear what button does what, hover over the graphic button to get a tooltip.
In Firefox or Netscape or Mozilla, you will see some tiny controls in the border of the table cell containing the cursor. The arrowheads add a row/column before/after the current one. The circle with a cross deletes the current row/column.

Why does Whizzywig behave differently in IE and Firefox?

Whizzywig tries to play to the strengths of each browser. Firefox (and Netscape and Mozilla) have this cute gizmo that gives controls to add/delete rows and columns when you are in a table cell. IE doesn't so Whizzywig provide facilities to manipulate rows and columns from the toolbar.

What does the Clean up button do?

The Clean up button Clean is there to strip out junk HTML introduced when you paste stuff in from  MS Word or other Office products. See an example before and after clean up. Currently Clean does the following:

If you don't want these changes, leave the Cleanup button off the toolbar.

If you want to force these changes, call

cleanUp()

on form submission, e.g.:

<form name="Whizzy" action="/ed.php" method="post" onsubmit="cleanUp();">

Cleanup works a lot better in conjunction with xhtml: if you know there will be a lot of pasting in from Word, consider using the xhtml option with Whizzywig.

Why allow colors that are not in the 'web safe' palette?

The web-safe palette restricts you to 216 colors that were guaranteed to display correctly on a bunch of hardware and software that died years ago. Even handhelds today display millions of colors. Don't fret about it.

Why don't the dialogs come up in separate windows, as they do in other rich text editors?

If Whizzywig was just like all the others there'd be little point to it.
The drop-down dialogs (for table, color, image) mean we don't have to worry about pop-up blockers.
We don't have to supply the dialogs in separate files, making it easier for you to install and deploy.
We don't have to make a round trip from the browser to the server to go and fetch a dialog page, making Whizzywig a lot faster and more responsive.

What does whizzed.php do? How do I handle the edited text in PHP?

In the demos, we use whizzed.php to render the output from whizzywig. At just a dozen lines it is pretty simple: you can view and download the source of whizzed.php.
Unless the output is going into a database, it's important to use stripslashes() on the variable containing the whizzywig output.
If you need to see a more detailed example, download abitwhizzy.php, a script that can edit existing html pages and create new ones.
You can use abitwhizzy as a very simple content manager for your website.

I don't speak PHP - how do I use whizzywig with ASP?

If you need to see an example of whizzywig used with an asp page, download abitwhizzy.asp, a script that can edit existing html pages and create new ones.
You could use abitwhizzy as a very simple content manager for your website, but be sure to password protect it.

There's loads of these things aren't there? why write another one?

Well, if you must know - why I wrote Whizzywig.

Can I count or limit the number of words entered?

Here is some javascript code that counts words:
function checkWords(thing,limit) {
 var cnt = wordCount(thing);
 if (cnt > limit) {
  alert(cnt-limit+" too many words");
  return false;
} else return true; } function wordCount(thing) { var txt=thing.value; txt = txt.replace(/<[^>]*>/g,''); //don't count html var words = txt.match(/bw+b/g); //magic! document.getElementById('cnt').value=words.length; return words.length;
}
<h1>Word Count</h1> <from method="post" action="http://unverse.net/whizzed.php"> <textarea id="ta" name="edited" rows="6" cols="25" onkeyup="checkWords(this,30)"> </textarea> <script>makeWhizzyWig("ta","bold italic bullet link");</script> <input value="go" type="submit"> <input id="cnt" size="3" type="text"> words (limit 30)

Notes

  1. Maybe we'll embed something like this into whizzywig in the future, but if you need to limit words you need to limit them for users who don't support whizzywig and only see the textarea. This works without whizzywig.
  2. And you can't rely on your users having javascript enabled,  so you'd better repeat the word count on the server if it's vital.
  3. You need to replace the value 30 (appears twice in the above) with your own word count limit.

Why isn't my question isn't answered here?

Tell us your question and we'll try and answer it.

hide menu | Show caps
Google