microsoft / microsoft/monaco-editor

Documentation for the webpack plugin's `features` constructor option

Open
#4,249 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
Dominant language
JavaScript
Stars
46.8k
Forks
4.1k
Avg merge
17h 58m
Merged PRs (30d)
1

Description

Context
  • This issue is not a bug report. (please use a different template for reporting a bug)
  • This issue is not a duplicate of an existing issue. (please use the search to find existing issues)
Description

I would like to gain a better understanding of the features option that can be passed to MonacoWebpackPlugin to include/exclude subsets of features.

The documentation currently states:

features (string[]) - include only a subset of the editor features. By default, all features shipped with the monaco-editor will be included. Instead of enumerating included features, it is also possible to exclude certain default features prefixing them with an exclamation mark '!'.

To view a list of all available features, you can run import metadata from 'monaco-editor/esm/metadata'; console.log(metadata.features);.

Running import metadata from 'monaco-editor/esm/metadata'; console.log(metadata.features) returns a useful array of objects containing feature labels and corresponding entry points:

[
  {
    label: 'anchorSelect',
    entry: 'vs/editor/contrib/anchorSelect/browser/anchorSelect'
  },
  ...

However, I was wondering if any more in-depth documentation surrounding these features exists, i.e. a table or a page listing the editor functionality provided in each subset?

The reason I ask is because I am building a markdown editor and only require a subset of the available features, I have configured MonacoWebpackPlugin to include only the following subsets, but inaverdently removed the ability to move/copy lines up and down (Alt+Up/Shift+Alt+Up):

features: [
  'clipboard',
  'codeAction',
  'contextmenu',
  'cursorUndo',
  'find',
  'fontZoom',
  'inPlaceReplace',
  'indentation',
  'lineSelection',
  'links',
  'multicursor',
  'quickCommand',
  'referenceSearch',
  'wordHighlighter'
]

Is there any quick reference documentation? I am currently testing each feature individually.

Monaco Editor Playground Link

No response

Monaco Editor Playground Code

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the MonacoWebpackPlugin features option and the monaco-editor/esm/metadata entry point mentioned in the issue. Trace the listed feature labels to the editor functionality they provide, then add a quick-reference document or table; the work is done when users can identify which feature enables each relevant action.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
build-system, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.