From 20c04c09060a80ed6699ed71e3809d2812b1281e Mon Sep 17 00:00:00 2001 From: Gonzalo Uceda Date: Fri, 27 Oct 2023 15:09:41 +0200 Subject: [PATCH] docs(Code): improve documentation --- .../code/src/components/DiffEditor/stories/DiffEditor.mdx | 5 ++--- packages/code/src/components/Editor/stories/Editor.mdx | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/code/src/components/DiffEditor/stories/DiffEditor.mdx b/packages/code/src/components/DiffEditor/stories/DiffEditor.mdx index 184c2a1c1..8068dcbc6 100644 --- a/packages/code/src/components/DiffEditor/stories/DiffEditor.mdx +++ b/packages/code/src/components/DiffEditor/stories/DiffEditor.mdx @@ -76,10 +76,9 @@ export const CustomThemed = () => { ## Registering a custom language The Editor supports custom languages. To use a custom language, the language and its configuration must be registered with the editor using the `registerLanguage` function. +**Please, refrain from directly using monaco editor's `monaco.languages.register` function, as it might side-effect other editors.** -For more a more advanced use case, visit [Custom Language With Validation](#custom-language-with-validation). - -See also [Monaco Editor - Custom Languages](https://microsoft.github.io/monaco-editor/monarch.html) +For more a more advanced use case, visit [Custom Language With Validation](#custom-language-with-validation). See also [Monaco Editor - Custom Languages](https://microsoft.github.io/monaco-editor/monarch.html) and [Monaco Editor - Custom Autocompletion](https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-custom-languages) for more information regarding language definitions and autocompletion. diff --git a/packages/code/src/components/Editor/stories/Editor.mdx b/packages/code/src/components/Editor/stories/Editor.mdx index 20e1531d7..96d980e8f 100644 --- a/packages/code/src/components/Editor/stories/Editor.mdx +++ b/packages/code/src/components/Editor/stories/Editor.mdx @@ -70,10 +70,9 @@ return ( ## Registering a custom language The Editor supports custom languages. To use a custom language, the language and its configuration must be registered with the editor using the `registerLanguage` function. +**Please, refrain from directly using monaco editor's `monaco.languages.register` function, as it might side-effect other editors.** -For more a more advanced use case, visit [Custom Language With Validation](#custom-language-with-validation). - -See also [Monaco Editor - Custom Languages](https://microsoft.github.io/monaco-editor/monarch.html) +For more a more advanced use case, visit [Custom Language With Validation](#custom-language-with-validation). See also [Monaco Editor - Custom Languages](https://microsoft.github.io/monaco-editor/monarch.html) and [Monaco Editor - Custom Autocompletion](https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-custom-languages) for more information regarding language definitions and autocompletion.