Revision #4 has been created by lucifurious on Jun 12, 2009, 12:41:47 AM with the memo:
Changed code formatting
« previous (#3) next (#5) »
How to use markItUp! on a text field for full WYSIWYG editing
[...]There is no configuration necessary after you have installed the psYiiExtensions library and set your path alias in your main.php configuration file.
# Step 1: Create a TEXTAREA #
You must create a TEXTAREA somewhere in your HTML to use the markItUp! widget. Give your TEXTAREA a unique id:
textarea id='myTextArea' class='html' rows='10' cols='50'
# Step 2: Create your widget #
Now that your form contains a TEXTAREA with a unique id ('myTextArea'), we can create our widget. This can be placed anywhere within your view, but put it at the top somewhere for easy maintenance.
CPSMarkItUpWidget::create( array( 'id' => 'myTextArea' ) );
# Step 3: Enjoy! #
That's all there is to it! When you refresh your page, you should see a full WYSIWYG text editor where your TEXTAREA was!
# Options #