Skip to content

A prototype using Monaco Editor to demonstrate how we could highlight content blocks within publishing apps.

Notifications You must be signed in to change notification settings

alphagov/content-block-editor

Repository files navigation

Content Block Editor

A prototype using Monaco Editor to demonstrate how we could highlight content blocks within publishing apps.

Local development

  1. Clone the repo

  2. Install dependencies:

    yarn install
  3. Run the development server:

    yarn run dev
  4. Access the Example editor

  5. Run tests

    Unit tests

    yarn run test

    E2E tests (using Playwright)

    yarn run e2e-test

Overview

The editor can be used as a "drop-in" replacement for textareas, allowing Content Block embed codes from Content Block Manager to be highlighted, and (in future) provide contextual information about the blocks.

Currently, all that the application does is highlight blocks like so:

Preview

In future, we'd like to:

Additionally, we can quite easily provide Markdown highlighting using see the Markdown example here, but we need to test the basic principle with users first.

A (very rough) prototype containing much of these features can be found in the Prototype directory. The most interesting stuff can be found in the monaco.js file

Demo

You can see a demo of the work so far here

About

A prototype using Monaco Editor to demonstrate how we could highlight content blocks within publishing apps.

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •