Repository: content-block-editor
A prototype using Monaco Editor to demonstrate how we could highlight content blocks within publishing apps.
- GitHub
- content-block-editor
- Ownership
- #govuk-publishing-content-modelling-dev
- Category
- Utilities
We’d like to set some cookies to understand how you use this site and remember your settings.
We also use cookies set by other sites to help us deliver content from their services.
You have accepted additional cookies. You can change your cookie settings at any time.
You have rejected additional cookies. You can change your cookie settings at any time.
A prototype using Monaco Editor to demonstrate how we could highlight content blocks within publishing apps.
A prototype using Monaco Editor to demonstrate how we could highlight content blocks within publishing apps.
Clone the repo
Install dependencies:
npm install
Run the development server:
npm run dev
Access the Example editor
Run tests
npm run test
npm run e2e-test
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:
In future, we’d like to:
registerInlayHintsProvider
)registerHoverProvider
)registerCompletionItemProvider
)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
You can see a demo of the work so far here