Forum OpenACS Q&A: MSIE HTML edit control for ETP?

Collapse
Posted by Guan Yang on
Internet Explorer has a slick built-in HTML editing control that Radio UserLand (for example) uses. Does anyone have a patch for Edit-This-Page that uses IE's control when possible?
Collapse
Posted by Jun Yamog on
Hi Guan,

You can look at modETP.  There are 2 packages there, one is a package that makes use of MSIE.

http://www.infiniteinfo.com/openacs/modetp.tgz

Although I would suggest that you just study this.  I just hacked up modetp and it was a real bad hack and wack.

If you have time I would suggest that you study and make use of bitflux editor.  And make a package for OpenACS.

http://bitflux.ch/editor/

Collapse
Posted by Robert Locke on
I also think it would be great to integrate a WYSIWYG/HTML editor/control into the templating system.  So that you could do something like:

template::element create form w -widget wysiwyg ...

Not sure how to make it flexible enough so that the developer can choose their preferred WYSIWYG/HTML solution.  Perhaps a WYSIWYG service contract?  Sounds silly, but maybe the idea has merit.

Also, the WYSIWYG editor should allow the user to insert an image by either picking one from the ETP content repository or uploading one.  It should also allow the easy creation of links to other pages within ETP.

The package Jun is referencing supports the above features, but is admittedly an ugly and quick hack.

Collapse
Posted by Jun Yamog on
Having WYSIWYG editor is a cool factor.  Although caution must be taken.  A real CMS system should always decouple content from look.  modETP is sadly not a real CMS, its a glorified edit your site.  The IE control does not know that there is a real CMS on the backend.  So what happens is that related items and layout are stored into the content.  Thereby making it diffcult to change the look of the content aside from the borders around it.  404s are also not eliminated.

I think bitflux editor has promise of OpenACS since it seems to be designed to be CMS backend aware.  Its a matter of having OpenACS give the proper data to bitflux and reading the data that bitflux returns.  I think its a major undertaking but not impossible.

I think the IE activeX control is an ok solution in the short term especially on non CMS packages such a forums or bboard.  Of course the HTML code will be as bad as FrontPage too :)

Collapse
Posted by Robert Locke on

Good points, but all we're talking about here is replacing the plain old vanilla "textarea" in the ETP page editor (where the user is *expected* to enter HTML anyways) with a WYSIWYG/HTML control which allows non-programmers to format their content without needing to learn HTML.

Believe it or not, the MSIE HTML edit control actually generates half-decent HTML with minimal "look-and-feel" markups (ie, site-wide style sheets still work) unless you explicitly change the font and/or cut and paste from Word or something.

But bitflux sounds like it could be a much better option, especially since it works under multiple browsers.

Collapse
Posted by Jun Yamog on
Hi Rob,

To replace the Text Area with MSIE HTML edit control is possible and is proven, but like what I have stated "caution must be taken" for CMS application.  MSIE HTML edit even makes ETP/modETP less CMS capable.  Style and layout are placed in the content, plus images are linked via absolute URLs. I have put up the above post since I have experienced this problems first hand.  Its my unbiased opinion to people who want to implement a real CMS solution with a WYSIWYG and not to use the MSIE HTML edit route. The use of MSIE HTML edit control on modETP suits our needs and situation, which is ok by me.

Although I would discourage others from using it, especially in the context of CMS.  Hopefully other people (not just Guan) maybe in a situation wherein they can build a WYSIWYG editor that is ok on general use and CMS use.  Thanks for understanding.

Collapse
Posted by Tilmann Singer on
Does this IE HTML widget allow the form builder to limit the html elements it accepts? E.g. could I build a form that displays this widget but it only allows <b> and <i> and nothing else besides normal text?
Collapse
Posted by Jun Yamog on
Hi Til,

Yes I believe its possible to just diplay the "B" and "I" buttons.  Its similar to the Outlook or Word control.  You can look at hotmail when you are using IE.

Although I don't know if its possible to restrict say:  You know the shortcut keys on stuff.  Maybe even tab makes a blockquote.  Of course enter will insert "p"s.  And pasting from another MS HTML control such as Word will carry over layout from Word, including the fonts.