Two small suggestions re: addForm & keydown

Want to see something in NicEdit? Add suggestions here

Two small suggestions re: addForm & keydown

Postby Ythan » Tue Jun 03, 2008 1:13 pm

I recently replaced Whizzywig with NicEdit in my custom CMS. It works great and I am extremely satisfied. I especially appreciate that the formatting buttons change status to reflect the current text style, along with the Opera and Safari support. These features are typically lacking in the "lightweight" WYSIWYG editors I've evaluated.

I have two small suggestions; I've implemented them both myself but I figured I'd propose them for official consideration as well.

First, pre-3.0 versions of Firefox have a bug which prevents the cursor from appearing in text boxes under certain circumstances. NicEdit is affected; no cursor appears in the text fields for links, images, HTML, etc. although they can be focused and edited without the benefit of a cursor. There are several fixes mentioned on Mozilla's site, the one which worked best for me without any unwanted effects is to change overflow from "hidden" to "auto". In addForm, this line:

Code: Select all
var B=new bkElement("div").setStyle({overflow:"hidden",clear:"both"}).appendTo(this.form)


changes to:

Code: Select all
var B=new bkElement("div").setStyle({overflow:"auto",clear:"both"}).appendTo(this.form);


The other problem is that NicEdit blocks keyboard shortcuts, eg. Ctrl-C and Ctrl-V don't work to copy and paste. I understand this is intentional since NicEdit introduces its own keyboard shortcuts. However, I believe only shortcuts handled by NicEdit (eg. Ctrl-B to bold) should block the default behavior while unrecognized shortcuts should be let through to the browser. My workaround is to return a value from the 'key' function if it performed an action, then propagate that back down to return false and preventDefault() only when set. However my implementation is extremely ugly given my limited knowledge of Javascript and inadequate understanding of NicEdit's internals. I'd love to see this fix added to the official distribution.

Other than those two suggestions, I'd just like to reiterate that I really am thrilled with NicEdit and grateful for such a lightweight, high-quality WYSIWYG editor. Thank you!

Regards,

-Y
Ythan
 
Posts: 1
Joined: Tue Jun 03, 2008 12:40 pm
Location: Upstate NY, USA

Return to Suggestions/Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest