Web Development with jQuery®

(Elliott) #1

Creating Buttons to Apply Bold, Italic, Underline, Font, and Font Size (^) ❘ 469


FIGURE 22-1


CREATING BUTTONS TO APPLY BOLD, ITALIC, UNDERLINE,


FONT, AND FONT SIZE


So far, you have a text editor; in this section, you learn how to add rich-text features for formatting
the text. You build a toolbar to house these features. Begin with the following HTML (Example
22-2.html):

<!DOCTYPE HTML>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta http-equiv='content-type'
content='application/xhtml+xml; charset=utf-8' />
<meta http-equiv='content-language' content='en-us' />
<meta charset='utf-8' />
<title>WYSIWYG Editor 2</title>
<link href='Example 22-2.css' rel='stylesheet' />
<script type='text/javascript' src='../jQuery.js'></script>
<script type='text/javascript' src='Example 22-2.js'></script>

http://www.it-ebooks.info

Free download pdf