How to use the ngx-monaco-editor.MonacoEditorModule.forRoot function in ngx-monaco-editor

To help you get started, we’ve selected a few ngx-monaco-editor 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 zowe / zlux-editor / webClient / src / app / app.module.ts View on Github external
import { MatSnackBarModule } from '@angular/material';

@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    CommonModule,
    // NoopAnimationsModule,
    MatIconModule,
    HttpModule,
    CoreModule,
    // AppRoutingModule,
    DashboardModule,
    EditorModule,
    MonacoEditorModule.forRoot(new MonacoConfig().config),
    SharedModule,
    MatSnackBarModule,
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

/*
  This program and the accompanying materials are
  made available under the terms of the Eclipse Public License v2.0 which accompanies
  this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
  
  SPDX-License-Identifier: EPL-2.0
  
  Copyright Contributors to the Zowe Project.
github Activiti / activiti-modeling-app / projects / ama-sdk / src / lib / code-editor / code-editor.module.ts View on Github external
import { FormsModule } from '@angular/forms';
import { MonacoEditorModule, NGX_MONACO_EDITOR_CONFIG } from 'ngx-monaco-editor';
import { CodeEditorComponent } from './components/code-editor/code-editor.component';
import { CodeEditorService } from './services/code-editor-service.service';


export function monacoEditorConfigFactory(codeEditorService: CodeEditorService) {
    return codeEditorService.getConfig();
}

@NgModule({
    imports: [
        CommonModule,
        FormsModule,
        // We re-provide module's internal NGX_MONACO_EDITOR_CONFIG, see the providers
        MonacoEditorModule.forRoot({})
    ],
    declarations: [CodeEditorComponent],
    exports: [
        CommonModule,
        FormsModule,
        MonacoEditorModule,
        CodeEditorComponent
    ],
    providers: [
        {
            provide: NGX_MONACO_EDITOR_CONFIG,
            useFactory: monacoEditorConfigFactory,
            deps: [ CodeEditorService ]
        }
    ]
})
github stone-jin / spring-cloud-config-admin-web / dist / demo / default / src / app / app.module.ts View on Github external
import { ScriptLoaderService } from './_services/script-loader.service';
import { ThemeRoutingModule } from './theme/theme-routing.module';
import { AuthModule } from './auth/auth.module';
import { SharedModule } from './shared/shared.module';
import { MonacoEditorModule } from 'ngx-monaco-editor';

@NgModule({
    declarations: [ThemeComponent, AppComponent],
    imports: [
        SharedModule,
        BrowserModule,
        BrowserAnimationsModule,
        AppRoutingModule,
        ThemeRoutingModule,
        AuthModule,
        MonacoEditorModule.forRoot(), // use forRoot() in main app module only.
    ],
    providers: [ScriptLoaderService],
    bootstrap: [AppComponent],
})
export class AppModule { }
github Bee-Mar / mmpm / gui / src / app / app.module.ts View on Github external
ActiveProcessCountTickerComponent,
    ActiveProcessesModalComponent,
    InstallationConflictResolutionDialogComponent,
    AvailableUpgradesTickerComponent,
    AvailableUpgradesModalDialogComponent,
    SelectModalComponent,
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    BrowserAnimationsModule,
    MaterialModule,
    HttpClientModule,
    ReactiveFormsModule,
    FormsModule,
    MonacoEditorModule.forRoot({
      baseUrl: environment.assetsPath,
      defaultOptions: {
        language: "javascript",
        scrollBeyondLastLine: false,
        minimap: {
          enabled: false
        },
        scrollbar: {
          useShadows: true,
          verticalHasArrows: false,
          horizontalHasArrows: false,
          vertical: "visible",
          verticalScrollbarSize: 12,
          horizontalScrollbarSize: 12,
          arrowSize: 30
        },
github nezhar / snypy-frontend / src / app / app.module.ts View on Github external
HelpModalComponent,
    TeamMemberModalComponent,
    TeamMemberDeleteModalComponent,
    LabelDeleteModalComponent,
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    NgxResourceFactoryModule.forRoot(),
    NgbModule,
    FontAwesomeModule,
    PerfectScrollbarModule,
    NgSelectModule,
    FormsModule,
    ReactiveFormsModule,
    MonacoEditorModule.forRoot(),
    NgPipesModule,
    BrowserAnimationsModule,
    ToastrModule.forRoot(),
    NgxAnxFormsModule.forRoot(),

    ServicesModule.forRoot(),
  ],
  providers: [
    {
      provide: PERFECT_SCROLLBAR_CONFIG,
      useValue: DEFAULT_PERFECT_SCROLLBAR_CONFIG
    },
    {
      provide: HTTP_INTERCEPTORS,
      useClass: JwtInterceptor,
      multi: true
github sbb-design-systems / sbb-angular / src / app / app.module.ts View on Github external
NavlistIconComponent,
    SearchIconComponent,
    ReplacePipe,
    ComponentsListComponent,
    IconsListComponent,
    DocDirective,
    ExamplesTabDocComponent,
    ExamplesIconDocComponent,
    ComponentViewerComponent,
    TypographyComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    NgbModule,
    MonacoEditorModule.forRoot({ baseUrl: './assets' }),
    AppRoutingModule,
    IconCollectionModule,
    ExamplesModule,
    ReactiveFormsModule.withConfig({ warnOnNgModelWithFormControl: 'never' }),
    PerfectScrollbarModule,
    HttpClientModule,
    BrowserAnimationsModule
  ],
  bootstrap: [AppComponent],
  entryComponents: [
    TextareaShowcaseComponent,
    LinksShowcaseComponent,
    AutocompleteShowcaseComponent,
    ButtonShowcaseComponent,
    RadioButtonShowcaseComponent,
    CheckboxShowcaseComponent,
github mprove-io / mprove / src / app / modules / shared.module.ts View on Github external
const pipesArray = [
  pipes.CapitalizePipe,
  pipes.GroupByPipe,
  pipes.HideColumnsPipe,
  pipes.ExtensionPipe,
  pipes.ChartIconPipe
];

const directivesArray = [
  directives.SingleClickDirective,
  directives.DisableControlDirective
];

@NgModule({
  imports: [MonacoEditorModule.forRoot(), TreeModule.forRoot()],
  declarations: [...pipesArray, ...directivesArray],
  exports: [...pipesArray, ...directivesArray, MonacoEditorModule, TreeModule],
  providers: pipesArray
})
export class SharedModule {}
github Azure / Azure-AppServices-Diagnostics-Portal / AngularApp / projects / applens / src / app / modules / dashboard / dashboard.module.ts View on Github external
component: SearchResultsComponent
            }
        ]
    },

]);

@NgModule({
    imports: [
        AvatarModule,
        CommonModule,
        FormsModule,
        DashboardModuleRoutes,
        DiagnosticDataModule,
        SharedModule,
        MonacoEditorModule.forRoot(),
        AngularSplitModule,
        CollapsibleMenuModule,
        NgxSmartModalModule.forRoot(),
        NgSelectModule,
        MarkdownModule.forRoot(),
        HighchartsChartModule
    ],
    providers: [
        ApplensDiagnosticService,
        SearchService,
        ApplensCommsService,
        ApplensSupportTopicService,
        InitResolver,
        {
            provide: ResourceService,
            useFactory: ResourceServiceFactory,
github sbb-design-systems / sbb-angular / projects / angular-showcase / src / app / public / public-examples / public-examples.module.ts View on Github external
TooltipShowcaseComponent,
  TagShowcaseComponent,
  UsermenuShowcaseComponent
];

@NgModule({
  declarations: exampleComponents,
  entryComponents: exampleComponents,
  exports: exampleComponents,
  imports: [
    BrowserModule,
    CommonModule,
    RouterModule,
    FormsModule,
    ReactiveFormsModule,
    MonacoEditorModule.forRoot(),
    IconCollectionModule,
    AccordionModule,
    AutocompleteModule,
    BadgeModule,
    BreadcrumbModule,
    ButtonModule,
    CaptchaModule,
    CheckboxModule,
    CheckboxPanelModule,
    DatepickerModule,
    DropdownModule,
    FieldModule,
    FileSelectorModule,
    GhettoboxModule,
    LightboxModule,
    LinksModule,
github Alfresco / alfresco-ng2-components / demo-shell / src / app / app.module.ts View on Github external
routing,
        FormsModule,
        HttpClientModule,
        MaterialModule,
        AppExtensionsModule,
        FlexLayoutModule,
        CoreModule.forRoot(),
        ContentModule.forRoot(),
        InsightsModule.forRoot(),
        ProcessModule.forRoot(),
        ProcessServicesCloudModule,
        ExtensionsModule.forRoot(),
        ThemePickerModule,
        ChartsModule,
        AppCloudSharedModule,
        MonacoEditorModule.forRoot()
    ],
    declarations: [
        AppComponent,
        LogoutComponent,
        AppLayoutComponent,
        HomeComponent,
        SearchBarComponent,
        SearchResultComponent,
        SearchExtendedComponent,
        LogComponent,
        ProcessServiceComponent,
        ShowDiagramComponent,
        FormViewerComponent,
        FormNodeViewerComponent,
        AppsViewComponent,
        FilesComponent,

ngx-monaco-editor

Monaco Code Editor for Angular

MIT
Latest version published 4 years ago

Package Health Score

50 / 100
Full package analysis

Popular ngx-monaco-editor functions