Helper: admin/util/wysiwyg

« All helpers

Call this to turn a textarea into a wysiwyg editor.

In PHP code, call it like this:

$this->run ('admin/util/wysiwyg', array ('field_id' => 'body'));

In a view template, call it like this:

{! admin/util/wysiwyg?field_id=my_field !}

Alternately, you can disable the auto-initialization and call it manually on an element like this:

{! admin/util/wysiwyg?field_id=0 !}

<textarea id="edit-me"></textarea>

<script>
$(function () {
    $('#edit-me').wysiwyg ();
});
</script>