How to use ngx-markdown - 10 common examples

To help you get started, we’ve selected a few ngx-markdown examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github angular-material-extensions / google-maps-autocomplete / src / app / app.module.ts View on Github external
libraries: ['places'],
  language: 'en',
  // region: 'DE'
};

@NgModule({
  declarations: [
    AppComponent,
    ConfigComponent
  ],
  imports: [
    BrowserModule.withServerTransition({appId: 'serverApp'}),
    BrowserAnimationsModule,
    RouterModule.forRoot([]),
    Angulartics2Module.forRoot(),
    MarkdownModule.forRoot(),
    AgmCoreModule.forRoot(googleMapsParams),
    MatGoogleMapsAutocompleteModule,
    FlexLayoutModule,
    FormsModule,
    ReactiveFormsModule,
    HttpClientModule,
    MatButtonToggleModule,
    MatCardModule,
    MatInputModule,
    MatExpansionModule,
    MatTabsModule,
    MatRadioModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
github angular-material-extensions / contacts / demo / src / app / app.module.ts View on Github external
import {HttpClient, HttpClientModule} from '@angular/common/http';
import {ServiceWorkerModule} from '@angular/service-worker';
import {environment} from '../environments/environment';
import {MarkdownModule} from 'ngx-markdown';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    // Add .withServerTransition() to support Universal rendering.
    // The application ID can be any identifier which is unique on
    // the page.
    BrowserModule.withServerTransition({appId: '@angular-material-extensions/contacts-demo-id'}),
    ServiceWorkerModule.register('/ngsw-worker.js', {enabled: environment.production}),
    MarkdownModule.forRoot({loader: HttpClient}),
    BrowserAnimationsModule,
    FormsModule,
    ReactiveFormsModule,
    HttpClientModule,
    AppRoutingModule,
    AppSharedModule,
    HomeModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule {
}
github sherweb / ngx-materialize / demo / src / app / app.module.ts View on Github external
import { MarkdownModule } from 'ngx-markdown';
import { MzButtonModule, MzIconMdiModule, MzSidenavModule } from 'ngx-materialize';

import { AppComponent } from './app.component';
import { ROUTES } from './app.routing';

@NgModule({
  imports: [
    // external modules
    BrowserAnimationsModule,
    CommonModule,
    MalihuScrollbarModule.forRoot(),
    MzButtonModule,
    MzIconMdiModule,
    MzSidenavModule,
    MarkdownModule.forRoot(),
    RouterModule.forRoot(ROUTES),
  ],
  declarations: [AppComponent],
  bootstrap: [AppComponent],
})
export class AppModule { }
github harmonyharmo / toronto.university / src / app / content / content.module.ts View on Github external
import { ReferralComponent } from './referral/referral.component';
import { JoinComponent } from './join/join.component';
import { GuideComponent } from './guide/guide.component';
import { ExamComponent } from './exam/exam.component';
import { NotfoundComponent } from './notfound/notfound.component';
import { NotesComponent } from './notes/notes.component';
import { TeamComponent } from './team/team.component';
import { WikiComponent } from './wiki/wiki.component';

@NgModule({
  imports: [
    CommonModule,
    AppRoutingModule,
    HomeModule,
    ContactModule,
    MarkdownModule.forChild(),
    SharedModule,
    // AngularFireModule.initializeApp({ databaseURL: 'https://toronto-university.firebaseio.com/'}),
    // AngularFireDatabaseModule
  ],
  declarations: [
    ContentComponent,
    AboutComponent,
    ReferralComponent,
    JoinComponent,
    GuideComponent,
    ExamComponent,
    NotfoundComponent,
    NotesComponent,
    TeamComponent,
    WikiComponent],
  exports: [ContentComponent]
github devconcept / ng-shopping-cart / docs / base-package / site / app / markdown-factory.ts View on Github external
export function markedOptionsFactory(router: Router): MarkedOptions {
  const renderer = new MarkedRenderer();

  renderer.blockquote = (quote: string) => {
    return `<blockquote class="note default">${quote}</blockquote>`
  };

  renderer.heading = (text: string, level: number) =&gt; {
    const escapedText = text.toLowerCase()
      .replace(/[^\w():]+/g, '-')
      .replace(/-code-/g, '-')
      .replace(/-strong-/g, '')
      .replace(/-$/, '')
      .replace(/^-/, '')
      .replace(/\([a-zA-Z: ]*\)$/, '');

    const currentUrl = router.routerState.snapshot.url.split('#')[0].substr(1);
    return level &gt;= 4
github xm-online / xm-webapp / src / app / xm.module.ts View on Github external
LayoutRoutingModule,
        NgxWebstorageModule.forRoot({prefix: 'jhi', separator: '-'}),
        XmSharedModule,
        HttpClientModule,
        BrowserAnimationsModule,
        GateHomeModule,
        GateAccountModule,
        ApplicationModule,
        SidebarModule,
        XmBalanceModule,
        XmEntityModule,
        XmDashboardModule,
        XmTimelineModule,
        XmNotificationsModule,
        XmConfigModule,
        MarkdownModule.forRoot()
    ],
    declarations: [
        XmMainComponent,
        NavbarComponent,
        ErrorComponent,
        PageRibbonComponent,
        FooterComponent
    ],
    providers: [
        XmApplicationConfigService,
        {
            provide: APP_INITIALIZER,
            useFactory: appInitializerFn,
            multi: true,
            deps: [XmApplicationConfigService]
        },
github goharbor / harbor / src / ui_ng / src / app / core / core.module.ts View on Github external
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ClarityModule } from '@clr/angular';
import { CookieModule } from 'ngx-cookie';
import { MarkdownModule } from 'ngx-markdown';

@NgModule({
    imports: [
        BrowserModule,
        FormsModule,
        HttpModule,
        ClarityModule.forRoot(),
        CookieModule.forRoot(),
        MarkdownModule.forRoot(),
        BrowserAnimationsModule
    ],
    exports: [
        BrowserModule,
        FormsModule,
        HttpModule,
        ClarityModule,
        BrowserAnimationsModule,
        MarkdownModule
    ]
})
export class CoreModule {
}
github mockoon / mockoon / src / app / app.module.ts View on Github external
ChangelogModalComponent,
    EnvironmentLogsComponent,
    HeadersListComponent,
    BannerComponent,
    RouteResponseRulesComponent,
    TruncatePipe
  ],
  imports: [
    AceEditorModule,
    BrowserAnimationsModule,
    BrowserModule,
    DragulaModule.forRoot(),
    FormsModule,
    HttpClientModule,
    NgbModule,
    MarkdownModule.forRoot({
      markedOptions: {
        provide: MarkedOptions,
        useFactory: MarkedOptionsFactory
      }
    }),
    AngularFireModule.initializeApp(Config.firebaseConfig),
    AngularFireAuthModule,
    AngularFirestoreModule,
    ReactiveFormsModule
  ],
  providers: [{ provide: FirestoreSettingsToken, useValue: {} }],
  bootstrap: [AppComponent]
})
export class AppModule {}
github tiberiuzuld / angular-gridster2 / src / app / app.module.ts View on Github external
GridTypesComponent,
    ItemsComponent,
    PushComponent,
    ResizeComponent,
    SwapComponent,
    MiscComponent,
  ],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    FormsModule,
    HttpClientModule,
    RouterModule.forRoot(appRoutes),
    MatIconModule, MatButtonModule, MatSelectModule, MatInputModule, MatCheckboxModule, MatSidenavModule, MatListModule,
    GridsterModule,
    MarkdownModule.forRoot({loader: HttpClient, markedOptions: {provide: MarkedOptions, useValue: {smartypants: true, breaks: true}}}),
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule {

}
github freenas / webui / src / app / pages / system / system.module.ts View on Github external
import { EnclosureModule } from './viewenclosure/enclosure.module';
import { EulaComponent } from './support/eula/eula.component';
import { TnSysInfoComponent } from './support/tn-sys-info/tn-sys-info.component';
import { SysImageComponent } from './support/sys-image/sys-image.component';
import { ProductionStatusComponent } from './support/production-status/production-status.component';
import { ProactiveComponent } from './support/proactive/proactive.component';
import { TnSupportComponent } from './support/tn-support/tn-support.component';
import { FnSupportComponent } from './support/fn-support/fn-support.component';
import { FnSysInfoComponent } from './support/fn-sys-info/fn-sys-info.component'


@NgModule({
  imports: [
    EntityModule, CommonModule, FormsModule,
    ReactiveFormsModule, NgUploaderModule, routing,
    MaterialModule, MarkdownModule.forRoot(), TranslateModule, FlexLayoutModule,
    EnclosureModule
  ],
  declarations: [
    GeneralComponent,
    AdvancedComponent,
    DatasetComponent,
    BootEnvironmentListComponent,
    BootEnvironmentCloneComponent,
    BootEnvironmentRenameComponent,
    BootEnvironmentCreateComponent,
    BootStatusListComponent,
    BootEnvAttachFormComponent,
    BootEnvReplaceFormComponent,
    TunableListComponent,
    TunableFormComponent,
    UpdateComponent,

ngx-markdown

Angular library that uses marked to parse markdown to html combined with Prism.js for synthax highlights

MIT
Latest version published 1 day ago

Package Health Score

83 / 100
Full package analysis