Yii 1.1: jmarkitup

A set of widgets that encapsulates the markItUp Content Editor
10 followers

A set of widgets (for Html, Textile, Wiki, Markdown, BBcode, Texy) that encapsulates the markItUp Content Editor (version 1.1.10).

markItUp! is a content editor plugin based on jQuery. It's not a WYSIWYG editor. Instead, it provides a lightweight, easy-to-use set of buttons, keyboard shortcuts, and other tools to add markup to your content.

Requirements

Yii 1.1.6 or above...

Usage

  • install and explore the demo application

Change log

Version 1.0

  • initial release

Resources

Total 3 comments

#4749 report it
jwerner at 2011/08/11 03:03am
Setting up a Preview Action

To get a working preview (e.g. for a Markdown editor) in the provided demo1-jmarkitup.zip application:

1) Create a new action in the Demo controller at protected/controllers/DemoController.php:

/**
 * Get a preview for Markdown code
 * 
 * The code to parse is supplied via the $_POST['data'] parameter
 */
public function actionPreviewMarkdown()
{
    $parser=new CMarkdownParser;
    $parsedText = $parser->safeTransform($_POST['data']);
    echo $parsedText;
}

2) Configure the previewParserPath option in the editor widget at protected/views/demo/_form.php:

case 4:
    $this->widget(
        'ext.jmarkitup.JMarkdownEditor',
        array(
            'model'=>$model,
            'attribute'=>'note',
            'theme'=>'gii',
            'htmlOptions'=>array('rows'=>15, 'cols'=>70),
            'options'=>array(
                 'previewParserPath'=>
                     Yii::app()->urlManager->createUrl('demo/previewMarkdown')
            )
        )
    );
break;
#3523 report it
volkmar at 2011/04/17 03:08pm
Requirements

nope :-)

#3503 report it
jwerner at 2011/04/15 05:13pm
Requirements

Is Yii 1.6 already out :-) ?

Leave a comment

Please to leave your comment.

Create extension