1.0.0 • Published 2 years ago
@gewd/components v1.0.0
@gewd/components
Angular Components
Features:
Install
npm install @gewd/markdown @gewd/components --save
- add
HighlightEditorModule
to your AppModule (or the one where you want to use it) - In your app folder
ng g webWorker prism
const prismWorker = () => new Worker('./prism.worker.ts', { name: 'markdown', type: "module" }); /* in your app module */ @NgModule({ declarations: [AppComponent], imports: [ /* ...*/, MarkdownModule ], providers: [ { provide: MarkdownOptionsInjectorToken, useValue: { getWorker: marked, options: { prism: { ...DEFAULT_PRISM_OPTIONS, /** if needed **/ languageFileType: 'min.js', // if you want to use the minified assets languageMap: { // alias to load the real file ts: 'typescript', // default cs: 'csharp' // additional } } } } as GetWorkerPayload }, ] })
copy the content of one the included workers into your created one