monaco-editor icon indicating copy to clipboard operation
monaco-editor copied to clipboard

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

Open sentrychris opened this issue 2 years ago • 1 comments

Context

  • [X] This issue is not a bug report. (please use a different template for reporting a bug)
  • [X] 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

sentrychris avatar Nov 09 '23 12:11 sentrychris

Unfortunately, there is no such documentation at the moment.

We'd support a community led initiative to improve documentation, but we don't have the resources to do and maintain the documentation ourselves.

Ideally, this documentation would live as doc comments (ideally with screenshots of the features) in the feature source code in the vscode repository.

hediet avatar Dec 14 '23 10:12 hediet