How to use markItUp! on a text field for full WYSIWYG editing

Comparing #3 with #4

Revision #4 was created by lucifurious lucifurious on Jun 12, 2009, 12:41:47 AM.

Changed code formatting

Content

[...]
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:

<code>
 
        &lt;
~~~
 
[html]
 
    <
textarea id='myTextArea' class='html' rows='10' cols='50'&gt;&lt;></textarea&gt;
 
</code>
>
 
~~~
# 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. <code>
 
 
```php 
CPSMarkItUpWidget::create( array( 'id' => 'myTextArea' ) ); </code>```

# 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 #
[...]