Socket
Socket
Sign inDemoInstall

ng-realmark

Package Overview
Dependencies
6
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ng-realmark

Real-time Markdown W/ Markdown three way merge


Version published
Maintainers
1
Install size
2.39 MB
Created

Readme

Source

NG-RealMark

Real-time Markdown module for Angular.io.

dependencies Status devDependencies Status

Features

  • Markdown preview component,
  • Markdown diff component,
  • Markdown three way merge component,

Live example here

Install (Angular CLI project)

Step 1: Add module to project through npm npm install ng-realmark --save

Step 2: Reference in main NgModule

import {RealMarkModule} from "ng-realmark/ng-realmark";
 
@NgModule({
  imports: [ …
    RealMarkModule.forRoot({flavor: 'github'}), // or original or vanilla
    …
	]…

Step 3: Add stylesheet to angular.cli

"styles": [
  ...
	"../node_modules/ng-realmark/realmark.css"
  ...
],

Usage

Component 1 - Previewer

<realmark-previewer [content]="markdownContentVar" > </realmark-previewer>

Automatic code block wrapping can be achieve be adding the [codeBlock]=“‘js’” attribute. E.g.

<realmark-previewer [content]="codeContentVar" [codeBlock]="'js'" > </realmark-previewer>

Component 2 - Diff

<realmark-diff [content]="MarkDownNewContent" [original]="MarkDownOriginalContent">
	Title to be displayed
</realmark-diff>

Automatic code block wrapping can be achieve be adding the [codeBlock]=“‘js’” attribute. E.g.

<realmark-diff [content]="CodeNewContent" [original]="CodeOriginalContent" [codeBlock]="'js'" >
	Title to be displayed
</realmark-diff>

Prerequisites

Please install Node.js and npm if they are not already installed on your computer.

Verify that you are running at least node v6.x.x and npm 3.x.x by running node -v and npm -v in a terminal / console window. Older versions may produce errors.

Keywords

FAQs

Last updated on 15 Oct 2018

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc