Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-hodgson committed Feb 19, 2016
1 parent 1cfcb57 commit cc276ac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
__v1.+ requires `markdown-it` v4.+, see changelog.__

`${image?fileName=joy%2Epng&align=None}` => `<span id="widget-11455839862556-795655980" class="widgetContainer" widgetparams="image?fileName=joy%2Epng&amp;align=None" />`
`${image?fileName=joy%2Epng&align=None}` => `<span id="widget-0my-unique-div-id" class="widgetContainer" widgetparams="image?fileName=joy%2Epng&amp;align=None" />`


## Install
Expand All @@ -26,10 +26,12 @@ bower install markdown-it-synapse --save
var md = require('markdown-it')()
.use(require('markdown-it-synapse'));

md.render('${image?fileName=joy%2Epng&align=None}') // => '<span id="widget-11455839862556-795655980" class="widgetContainer" widgetparams="image?fileName=joy%2Epng&amp;align=None" />'
md.render('${image?fileName=joy%2Epng&align=None}', 'my-unique-div-id') // => '<span id="widget-0my-unique-div-id" class="widgetContainer" widgetparams="image?fileName=joy%2Epng&amp;align=None" />'

```

The widgetparams can be used to determine what kind of html widget should be rendered in the output container.

_Differences in browser._ If you load script directly into the page, without
package system, module will add itself globally as `window.markdownitSynapse`.

Expand Down

0 comments on commit cc276ac

Please sign in to comment.