
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
angular2-markdown
Advanced tools
[![Build Status][travis-badge]][travis-badge-url] [![npm][circleci-badge-url]][circleci-url] [![version][npm-badge-url]][npm-url] [![npm][license-badge-url]][license-url] [![npm][dep-badge-url]][dep-url]
Source @ https://github.com/dimpu/angular2-markdown
angular2-markdown contains MarkdownModule by Angular 2.
Additionally we are using marked.js and prismjs for this component.
Install angular2-markdown
from npm
npm install angular2-markdown --save
or
yarn add angular2-markdown
angular-cli
please refer to getting-started-with-ng-cliangular-seed
please refer to getting-started-with-angular-seedsystem.js
(and angular2 quickstart) please checkout sample repositorywebpack
you can view our demo page source codeplnkr
sample available hereAoT using ngc and rollup
please refer to angular2-markdown-with-aotMain source of API documentation and usage scenarious available here: https://dimpu.github.io/angular2-markdown/
Are very welcome! And remember, contribution is not only PRs and code, but any help with docs or helping other developers to solve issues are very appreciated! Thanks in advance!
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { MarkdownModule } from 'angular2-markdown';
import { AppComponent } from '../src/app.component';
@NgModule({
imports: [
BrowserModule,
MarkdownModule.forRoot(),
],
declarations: [AppComponent],
bootstrap: [AppComponent],
})
<div Markdown>
### your markdown code
</div>
or use angular component
<markdown>
### your markdown code
</markdown>
// to load from remote url
<div Markdown path="/path/to/readme.md"></div>
// load remote source code with auto syantax helight.
<markdown path="/path/to/code.cpp"></markdown>
<markdown path="/path/to/code.java"></markdown>
Now, with >1.4.x you can bind Variable to markdown
component. To do so.
@Component({
selector: 'markdown,[Markdown]',
template: `
<textarea [(ngModel)]="textData"></textarea>
<markdown [data]="textData"></markdown>
`,
})
export class MyComp {
public textData = `## Markdown content data`;
}
You can found the working example inside the /demo directory
.
git clone https://github.com/dimpu/angular2-markdown.git
npm i
npm run demo.serve
now you should see working example at http://localhost:4200
FAQs
[![Build Status][travis-badge]][travis-badge-url] [![npm][circleci-badge-url]][circleci-url] [![version][npm-badge-url]][npm-url] [![npm][license-badge-url]][license-url] [![npm][dep-badge-url]][dep-url]
The npm package angular2-markdown receives a total of 187 weekly downloads. As such, angular2-markdown popularity was classified as not popular.
We found that angular2-markdown demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.