BYTE.com > Tangled in the Threads > 2001 > June
Ektron's eWebEditPro And eMPower
By Jon Udell
June 8, 2001
(The Universal Canvas
: Page 3 of 3 )
Spoke's use of the DHTML edit control prompted me to look around for other implementations.
The search led to Ektron, which has refined and packaged the technology to produce something I've long imagined: a complete pluggable replacement for the HTML TEXTAREA widget. The product, which wraps several layers of integration code around the core edit control, works with MSIE and (by way of a plugin) with Netscape, though for Windows only in both cases.
From a developer's perspective, the trick is performed in exactly the right way. When you want to embed the editor in an HTML file, you use JavaScript to source the editor's integration code into the page, define a hidden form variable to accumulate and send its output, and then create an instance of the control. To the user, it looks like Word where a TEXTAREA otherwise would have been. To the developer, it looks the same: that is, when unpacking form variables in a back-end script, the editor's HTML (or XHTML) output shows up in a named field, just like the output of a TEXTAREA widget would have.
There are three ways to control the behavior of the editor: JavaScript, ActiveX, and XML. The JavaScript API defines properties and events. Among the properties is a collection of instances, of which there can be several on the page. Methods include load() and save(), which transfer content between the editor and its associated hidden form variable. The ActiveX API allows more granular control -- for example, getting or setting the selected region within the editor.
Although Ektron does offer specific integration support for ASP, ColdFusion, PHP, and JSP, you can deploy the editor from any kind of Web server. The XML API is what makes this possible. When the editor loads, its JavaScript glue tells it where (on the server) to find an XML configuration file. That file then governs both the appearance and behavior of the control. Using XML declarations, you can fully customize the toolbar, the menus, and the wiring that connects these either to built-in commands, or to custom commands implemented elsewhere.
BYTE.com > Tangled in the Threads > 2001 > June
|