Gathering detailed insights and metrics for ngx-markdown-editor
Gathering detailed insights and metrics for ngx-markdown-editor
Gathering detailed insights and metrics for ngx-markdown-editor
Gathering detailed insights and metrics for ngx-markdown-editor
ngx-stackedit
FOSS WYSIWYG Markdown editor.
@ymchun/ngx-markdown-editor
A simple markdown editor component for Angular
ngx-markdown-editor-telegram
Angular markdown editor based on ace editor - fork to support telegram flavours
ngx-stacks-editor
An Angular wrapper for the Stacks Editor by StackOverflow
Angular markdown editor based on ace editor
npm install ngx-markdown-editor
Typescript
Module System
Node Version
NPM Version
TypeScript (77.59%)
HTML (13.46%)
SCSS (8.95%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Apache-2.0 License
178 Stars
129 Commits
48 Forks
3 Watchers
6 Branches
8 Contributors
Updated on Jun 09, 2025
Latest Version
5.3.4
Package Id
ngx-markdown-editor@5.3.4
Unpacked Size
442.72 kB
Size
107.00 kB
File Count
28
NPM Version
9.8.1
Node Version
18.15.0
Published on
Oct 19, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
3
Angular markdown editor based on ace editor
Install dependencies from npm repository:
1npm i ace-builds bootstrap font-awesome
Install ngx-markdown-editor
from npm repository:
1npm i ngx-markdown-editor
Add the assets、styles and scripts in angular.json
:
1{ 2 ... 3 "architect": { 4 "build": { 5 "options": { 6 ... 7 "assets": [ 8 { 9 "glob": "**/*", 10 "input": "node_modules/ace-builds/src-min", 11 "output": "./assets/ace-builds/" 12 } 13 ], 14 "styles": [ 15 "node_modules/bootstrap/dist/css/bootstrap.min.css", 16 "node_modules/font-awesome/css/font-awesome.min.css", 17 "node_modules/ngx-markdown-editor/assets/highlight.js/agate.min.css" 18 ], 19 "scripts": [ 20 "node_modules/ngx-markdown-editor/assets/highlight.js/highlight.min.js", 21 "node_modules/ngx-markdown-editor/assets/marked.min.js" 22 ] 23 ... 24 } 25 } 26 } 27 ... 28}
Add ace.js
in index.html
1<html> 2 <head> 3 <script src="/assets/ace-builds/ace.js"></script> 4 </head> 5 <body></body> 6</html>
1npm i brace bootstrap font-awesome
Install ngx-markdown-editor
from npm repository:
1npm i ngx-markdown-editor
Add the styles and scripts in angular.json
:
1{ 2 ... 3 "architect": { 4 "build": { 5 "options": { 6 ... 7 "styles": [ 8 "node_modules/bootstrap/dist/css/bootstrap.min.css", 9 "node_modules/font-awesome/css/font-awesome.min.css", 10 "node_modules/ngx-markdown-editor/assets/highlight.js/agate.min.css" 11 ], 12 "scripts": [ 13 "node_modules/ngx-markdown-editor/assets/highlight.js/highlight.min.js", 14 "node_modules/ngx-markdown-editor/assets/marked.min.js" 15 ] 16 ... 17 } 18 } 19 } 20 ... 21}
Import brace
in polyfills.ts
1import 'brace'; 2import 'brace/mode/markdown';
1import { LMarkdownEditorModule } from 'ngx-markdown-editor'; 2 3@NgModule({ 4 declarations: [ 5 AppComponent 6 ], 7 imports: [ 8 BrowserModule, 9 FormsModule, // make sure FormsModule is imported to make ngModel work 10 LMarkdownEditorModule 11 ], 12 providers: [], 13 bootstrap: [AppComponent] 14}) 15export class AppModule { }
1<md-editor name="Content" 2 [upload]="doUpload" 3 [preRender]="preRenderFunc" 4 [postRender]="postRenderFunc" 5 [(ngModel)]="content" 6 [height]="'200px'" 7 [mode]="mode" 8 [options]="options" 9 (onEditorLoaded)="onEditorLoaded($event)" 10 (onPreviewDomChanged)="onPreviewDomChanged($event)" 11 required 12 maxlength="500"> 13 <slot custom-btns></slot> 14</md-editor>
editor
| preview
, default is editor
1{ 2 showPreviewPanel?: boolean // Show preview panel, Default is true 3 showBorder?: boolean // Show editor component's border. Default is true 4 hideIcons?: Array<string> // ['Bold', 'Italic', 'Heading', 'Reference', 'Link', 'Image', 'Ul', 'Ol', 'Code', 'TogglePreview', 'FullScreen']. Default is empty 5 usingFontAwesome5?: boolean // Using font awesome with version 5, Default is false 6 fontAwesomeVersion?: '4' | '5' | '6' // FontAwesome Version, 4/5/6, default is 4 7 scrollPastEnd?: number // The option for ace editor. Default is 0 8 enablePreviewContentClick?: boolean // Allow user fire the click event on the preview panel, like href etc. Default is false 9 resizable?: boolean // Allow resize the editor 10 markedjsOpt?: MarkedjsOption // The markedjs option, see https://marked.js.org/#/USING_ADVANCED.md#options 11 customRender?: { // Custom markedjs render 12 image?: Function // Image Render 13 table?: Function // Table Render 14 code?: Function // Code Render 15 listitem?: Function // Listitem Render 16 }, 17 customIcons?: { // Custom icons in toolbar, default using font-awesome 4.x 18 Bold?: CustomIcon; 19 Italic?: CustomIcon; 20 Heading?: CustomIcon; 21 Reference?: CustomIcon; 22 Link?: CustomIcon; 23 Image?: CustomIcon; 24 UnorderedList?: CustomIcon; 25 OrderedList?: CustomIcon; 26 CodeBlock?: CustomIcon; 27 ShowPreview?: CustomIcon; 28 HidePreview?: CustomIcon; 29 FullScreen?: CustomIcon; 30 CheckBox_UnChecked?: CustomIcon; 31 CheckBox_Checked?: CustomIcon; 32 }; 33 placeholder?: string 34}
Function
): For #24, upload file by yourself
1constructor() { 2 this.doUpload = this.doUpload.bind(this); // This is very important. 3} 4 5doUpload(files: Array<File>): Promise<Array<UploadResult>> { 6 // do upload file by yourself 7 return Promise.resolve([{ name: 'xxx', url: 'xxx.png', isImg: true }]); 8} 9 10interface UploadResult { 11 isImg: boolean 12 name: string 13 url: string 14}
Function
): For #13, this will not effect ngModel
's value, just rendered value
1preRenderFunc(content: string) { 2 return content.replace(/something/g, 'new value'); // must return a string 3}
Function
): Change the html souce code generated by marked
before update the dom
1postRenderFunc(content: string) { 2 return content.replace(/something/g, 'new value'); // must return a string 3}
Tips: For
Function
input, please call bind atconstructor
to assign correctthis
pointer
onEditorLoaded: EventEmitter<AceEditor>
Fires when the ace editor loaded.onPreviewDomChanged: EventEmitter<HTMLElement>
Fires when the preview dom updatedNo vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 3/17 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
34 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More