ng-showdown

WebJar for ng-showdown

Лицензия

Лицензия

BSD 3-Clause
Категории

Категории

JavaScript Языки программирования Github Инструменты разработки Контроль версий
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

github-com-showdownjs-ng-showdown
Последняя версия

Последняя версия

1.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

ng-showdown
WebJar for ng-showdown
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/showdownjs/ng-showdown

Скачать github-com-showdownjs-ng-showdown

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/github-com-showdownjs-ng-showdown/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>github-com-showdownjs-ng-showdown</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-showdownjs-ng-showdown/
implementation 'org.webjars.npm:github-com-showdownjs-ng-showdown:1.1.0'
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-showdownjs-ng-showdown/
implementation ("org.webjars.npm:github-com-showdownjs-ng-showdown:1.1.0")
'org.webjars.npm:github-com-showdownjs-ng-showdown:jar:1.1.0'
<dependency org="org.webjars.npm" name="github-com-showdownjs-ng-showdown" rev="1.1.0">
  <artifact name="github-com-showdownjs-ng-showdown" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='github-com-showdownjs-ng-showdown', version='1.1.0')
)
libraryDependencies += "org.webjars.npm" % "github-com-showdownjs-ng-showdown" % "1.1.0"
[org.webjars.npm/github-com-showdownjs-ng-showdown "1.1.0"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.webjars.npm : angular jar [1.3.2,2)
org.webjars.npm : showdown jar [1,2)
org.webjars.npm : angular-sanitize jar [1.3.2,2)

Модули Проекта

Данный проект не имеет модулей.

ng-showdown

Angular integration for Showdown

How to use it

  1. Install it

a. via bower:

bower install --save ng-showdown

b. via npm

npm install --save ng-showdown
  1. Include 'ng-showdown' in your module dependencies
  2. Use it
<p markdown-to-html="vm.mymarkdown"></p>

Dependencies

ng-showdown depends on the ngSanitize module. Don't forget to include it:

<script src="angular.js"></script>
<script src="angular-sanitize.js"></script>

API

$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 directive

Example usage:

 <p markdown-to-html="vm.mymarkdown"></p>

Input: string - markdown to be parsed

Output: string - html output from showdown

stripHtml filter

Example usage:

 <p ng-bind="vm.someText | stripHtml"></p>

Input: string - Input to be stripped of html

Output: string - stripped html

Configuration

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

org.webjars.npm

ShowdownJS

Версии библиотеки

Версия
1.1.0