diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-03-18 11:55:24 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-03-18 11:55:24 +0100 |
commit | 3a43ef2c3fb60e0920188200c796a0db6ce4ed3f (patch) | |
tree | 506058994011f671289338ad1e9e28c0768f126a /docs/plugins | |
parent | 55deab03cd5ed0fee18cb768a24625e079ea1b41 (diff) | |
download | gitbook-3a43ef2c3fb60e0920188200c796a0db6ce4ed3f.zip gitbook-3a43ef2c3fb60e0920188200c796a0db6ce4ed3f.tar.gz gitbook-3a43ef2c3fb60e0920188200c796a0db6ce4ed3f.tar.bz2 |
Add doc for inline rendering
Diffstat (limited to 'docs/plugins')
-rw-r--r-- | docs/plugins/api.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/plugins/api.md b/docs/plugins/api.md index c5a17b3..135f196 100644 --- a/docs/plugins/api.md +++ b/docs/plugins/api.md @@ -12,6 +12,14 @@ var value = book.config.get('title', 'Default Value'); // Resolve a filename to an absolute path var filepath = book.resolve('README.md'); + +// Render an inline markup string +book.renderInline('markdown', 'This is **Markdown**') + .then(function(str) { ... }) + +// Render a markup string (block mode) +book.renderBlock('markdown', '* This is **Markdown**') + .then(function(str) { ... }) ``` #### Output instance |