1.0.0 • Published 2 years ago

@gewd/components v1.0.0

Weekly downloads
16
License
MIT
Repository
github
Last release
2 years ago

@gewd/components

Angular Components

NPM Version

Features:

Install

  1. npm install @gewd/markdown @gewd/components --save
  2. add HighlightEditorModule to your AppModule (or the one where you want to use it)
  3. In your app folder ng g webWorker prism
  4. 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
        },
      ]
    })
  5. copy the content of one the included workers into your created one

Example Code

1.0.0

2 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.6

5 years ago

0.1.4

5 years ago

0.1.5

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago