The bettereditormodule file

Our new .module file will implement the same pair of hooks that the previous module used, which are hook_help() and hook_init():

* A better version of the simple editor.

function bettereditor_help($path, $args) {

return t('This module provides a JavaScript based text \ editor.');

function bettereditor_init() {

$buttons[] = array( 'name' => 'B', 'tag' => 'strong', 'style' => 'font-weight: bold',

$buttons[] = array( 'name' => 'I', 'tag' => 'em',

$buttons[] = array( 'name' => 'S', 'tag' => 'del',

$buttons[] = array( 'name' => 'ul', 'tag' => array('ul', 'li'),

$buttons[] = array( 'name' => 'ol', 'tag' => array('ol', 'li'),

$buttons[] = array( 'name' => 'li', 'tag' => 'li',

Was this article helpful?

0 0

Post a comment