-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
YUI 2.8: Learning the Library
Long gone are the days when we struggled to highlight a word in an e-mail message for lack of underlining or boldfacing. The rich graphic environment that the Web provides has extended to anything we do on it; plain text is no longer fashionable.
YUI includes a Rich Text Editor (RTE) component in two varieties—the basic YAHOO.widget.SimpleEditor and the full YAHOO.widget.Editor. Both editors are very simple to include in a web page and they enable our visitors to enter richly formatted documents, that we can easily read and use in our applications. Beyond that, the RTE is highly customizable and allows us to tailor the editor that we show the user, in any way we want.
In this chapter, we'll see:
What each of the two editors offers
How to create either of them
Ways to retrieve the text entered
How to add toolbar commands
Change the font size
Change margin width
Change background colour