Forum OpenACS Q&A: Status of the "Nice Text Entry Widget"

I'm reveiw the .LRN UAB list and one of the issues has to do with the text formatting in the forums.

A high-level way to address this is a nice text-entry widget.  (I'm not sure if that is the commonly held name).  What is mean is an applet (or something like that) that works more like a word process and has buttons like bold.

I know I've seen examples of this working.  Anyone have one in their system or know the status?

Collapse
Posted by Caroline Meeks on
We have htmlarea working with BCMS on several sites.  I'll send you an email with a password to take a look on one of our client sites.  We'll try to get a demo area set up on Aristoi in the next couple days that we can give wider access to.
Collapse
Posted by Lars Pind on
HTMLArea, a WYSIWYG editor is integrated into the form builder's 'richtext' widget in stock OpenACS 5.1.

At this point, however, it requires that you edit a parameter on acs-templating to make it use that widget by default.

The reason is that it only works with IE and Mozilla.

I wanted to look at the User-Agent header and be smart about it. When you try using Safari, it'll show an annoying alert box, for example.

Really, to make it useful, we do need to check the user agent.

Hm. Will look into that.

Lars

Is this an improved version of the one that was working in IE in earlier versions of OACS? A quick glance at my 5.0.4 code shows that the javascript is still present in richtext-procs.tcl but I don't think it shows up in forms on IE.

The problem with checking user-agent is that they are spoofed to bypass problems with sites that check user-agents :o). For instance I believe Opera defaults to giving an IE user agent by default - or atleast its trivial to change. And indeed I have changed the user-agent in Galeon to spoof IE to allow me access to a site that throws up a stupid objection to accessing it in an non-M$ browser (even though it works without problems). A more reliable method is to use feature testing to determine if code should be executed e.g

if (document.getElementById) {
    W3C DOM API CODE
} else if (document.all) {
    IE 4 API
} else if (document.layers) {
    NETSCAPE 4 API (god help us)
} else {
   DON'T BOTHER
}

-Steve

Collapse
Posted by Matthias Melcher on
Tracy,
in my opinion, the focus is not WYSIWYG for "nice" HTML, bold and italic, but simply, what you should see is especially what line breaks you will get, and what other magic characters (like the &quot above). Otherwise you will have to permanently switch between proof-reading in the preview window, and correcting in the extry widget.
Collapse
Posted by Deds Castillo on
We have htmlarea working with BCMS on several sites. I'll send you an email with a password to take a look on one of our client sites. We'll try to get a demo area set up on Aristoi in the next couple days that we can give wider access to.

It's at http://www.aristoi.biz/bcms

Admin access on that node for all registered users. Or use
user:bcms-test@aristoi.biz / pass:test-bcms

Serves as testbed so it might be flaky from time to time.

Collapse
Posted by Matthias Melcher on
If WYSIWYG for line breaks is too complicated, a separate preview window would perhaps suffice if it could be refreshed somehow, after corrections have been made in the input window, and the input window should stay at the same scrolled position as before when refreshing.

Currently, it starts after "Edit again" at the top of the posting being replied-to, so that you might be appalled that your input is lost, and you have to scroll several times (first with the browser scroll bar to reach the input area scroll bar) unless you have a many inch monitor and very young eyes.

Collapse
Posted by Don Baccus on
Among other things the line breaks you see are going to differ  from browser-to-browser and screen-to-screen.  So showing them to you in WYSIWYG style isn't going to tell you anything particularly interesting regarding what other users will see.

As opposed to things like bold, italic, etc which are supported by HTMLarea.