An easy to use markdown directive with static outlining, html escaping/sanitization, resource loading and model binding.
A demonstration can be found here.
angular-sanitize is recommended but optional; the module will detect if it's available.
markdown directive can work with static content, model binding and external resources.
The simplest form is wrapping the
markdown directive around your text. The directive will automatically outline the content so that you don't have to worry about spaces or tabs in your html markup.
markdown-model attribute a model expression to convert its value to html.
The directive allows you to load markdown files from a server by specifying a url expression in the
markdown-src attribute. Note that, like the
ng-include attribute, this is an expression; static values should be surrounded by a single quote (
These attributes are simply overrides of the configuration. If no value (true/false) is provided the default found in the
markdownConfig is used.
markdown-escape-html - escape any html content.
markdown-sanitize - sanitize the html output.
markdown-outline - outline the markup.
Global configuration can be modified by injecting the
markdownConfig at the
config phase of your module.