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
Requirements
Is Yii 1.6 already out :-) ?
Requirements
nope :-)
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;
New Version
What's about new version? :)
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.