Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bshaffer committed Oct 21, 2011
1 parent aa212da commit b988bba
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Expand Up @@ -76,19 +76,19 @@ Optionally specify the column for the html to be persisted like so:

Helper functions include:

<div id="markdown-tab" class="markdown">
<?php echo $form['body_markdown']->renderError() ?>
<?php echo $form['body_markdown']->render() ?>
<p><?php echo markdown_preview_link($form['body_markdown']->renderName()) ?></p>
<div id="markdown_preview">&nbsp;</div>
</div>

* _markdown_preview_link($field, $linkName = 'Preview', $previewId = 'markdown_preview')_
- Takes the name of your markdown field (you must be outputing this in a symfony form)
and provides a link which, when clicked opens a popup window with the value rendered as markdown.
You have to define an elemnent with ID `markdown_preview` (or pass in a different ID) for
where the preview is shown.

<div id="markdown-tab" class="markdown">
<?php echo $form['body_markdown']->renderError() ?>
<?php echo $form['body_markdown']->render() ?>
<p><?php echo markdown_preview_link($form['body_markdown']->renderName()) ?></p>
<div id="markdown_preview">&nbsp;</div>
</div>

* _markdown($text)_
- Render text as markdown

0 comments on commit b988bba

Please sign in to comment.