
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
ng-showdown
Advanced tools
Angular integration for Showdown
a. via bower:
bower install --save ng-showdown
b. via npm
npm install --save ng-showdown
'ng-showdown'
in your module dependencies<p markdown-to-html="vm.mymarkdown"></p>
ng-showdown depends on the ngSanitize module. Don't forget to include it:
<script src="angular.js"></script>
<script src="angular-sanitize.js"></script>
$showdown
$showdown.makeHtml(markdown)
- Converts a markdown text into HTML
Input: string - markdown to be parsed
Output: string - html output from showdown
$showdown.stripHtml
- Strips a text of it's HTML tags. See http://stackoverflow.com/questions/17289448/angularjs-to-output-plain-text-instead-of-html
Input: string - html to be stripped
Output: string - string without <html>
tags
markdownToHtml
directiveExample usage:
<p markdown-to-html="vm.mymarkdown"></p>
Input: string - markdown to be parsed
Output: string - html output from showdown
stripHtml
filterExample usage:
<p ng-bind="vm.someText | stripHtml"></p>
Input: string - Input to be stripped of html
Output: string - stripped html
You can configure the options and extensions passed to showdown by using the $showdownProvider
. To see these options, visit the Showdown page.
$showdownProvider.setOption(key, value)
- sets the passed in option as a configuration option in showdown
$showdownProvider.getOption(key)
- get the option as determined by the passed in key.
$showdownProvider.loadExtension(extensionName)
- loads the extension into showdown as determined by the passed in extension name
FAQs
Official Showdown integration with AngularJS
The npm package ng-showdown receives a total of 1,209 weekly downloads. As such, ng-showdown popularity was classified as popular.
We found that ng-showdown demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.