ngx-ace
Language

Angular Ace Editor Package

ngx-ace

A standalone-first Angular wrapper for Ace with signal inputs, lazy-loaded assets, and SSR-safe runtime guards.

Use one focused package when you need embedded code editing without dragging the rest of the workspace feature set into the same dependency.

landing.ts

Project Overview

Package

ngx-ace

Ace editor building blocks for Angular, with browser-only setup guarded so server rendering stays intact.

License

MIT

Published as a public package and designed for reuse across multiple apps.

Installation

Install the package

$ npm i --save ngx-ace

Usage

Bootstrap with provideNgxAce()

import { provideNgxAce } from 'ngx-ace';

export const appConfig = {
  providers: [provideNgxAce()],
};

Configuration

Define editor defaults once

Register sensible editor defaults once instead of repeating the same mode, theme, or renderer options in every component that mounts Ace.

import { provideNgxAce } from 'ngx-ace';

export const appConfig = {
  providers: [
    provideNgxAce({
      mode: 'javascript',
      theme: 'github',
      useWorker: false,
      showPrintMargin: false,
      fontSize: 14,
      minLines: 12,
    }),
  ],
};

Features

What ngx-ace includes

Bootstrap and defaults

Standalone-first setup centered on provideNgxAce() with editor defaults registered once.

provideNgxAce() | default mode and theme | SSR-safe browser guards

Component API

Template-friendly editor wrapper with signal inputs, outputs, and two-way value binding.

AceComponent | [(value)], [mode], [theme], [config] | focus, blur, change, selection outputs

Directive control

Low-level directive access for teams that want direct editor instance methods and events.

AceDirective | ace(), getValue(), setValue(), clear() | readOnly and disabled state sync

Lazy loading

Modes and themes are loaded only when requested, with extension hooks for extra registrations.

ensureAce() | registerAceMode() and registerAceTheme() | text/javascript and github/clouds defaults

Reference

Documented feature pages

The detailed page below documents the Ace package public API and the files that make up the feature.