0.1.0 • Published 5 years ago

use-calcite-monaco-editor v0.1.0

Weekly downloads
-
License
-
Repository
github
Last release
5 years ago

ArcGIS Monaco Editor

Custom hook for using Microsofts Monaco Editor in React applications and customized functionality to integrate with ArcGIS items.

Documentation

Netlify Status

Installation

Import Syntax

Usage

Input

ref

options

NameTypeDefaultDescription
themeenum: 'light' | 'dark''light'Default themes of monaco.
valuestringThe editor value
languageenum: ...All languages that are supported by monaco-editor
diffEditorenum: 'true' | 'false''false'Set if using monaco diffEditor
modifiedValuestringThe editor value for modified code pane
modifiedLanguageenum: ...All languages that are supported by monaco-editor
schemaTypeenum: 'arcgis-item'Sets schema of the editor providing code completion, warnings, hover providers for item types, and marking readOnly values based on arcgis item type schemas
customSchemaobjectJSON Schema Object to set the editor schema
monacoConstructionOptionsobject{}IStandaloneEditorConstructionOptions
monacoOverrideServicesobject{}IEditorOverrideServices

Output

NameTypeDefaultDescription
isEditorReadybooleanDetermines if monaco has been initialized and editor created.
editorrefeditor instance
monacorefmonaco instance
warningMarkersarray[]Array of monaco warning markers. Auto updated.
errorMarkersarray[]Array of monaco error markers. Auto updated.
modalValuestringValue of the contents of the modal in string form. Auto updated.

Contributing

To get started, go ahead and fork this repo. Once you've done that, there are a few things you should know before getting started.

Before you Start

npm install

NPM tasks

To run Storybook

npm start

Use Storybook as the primary development/test environment.

To build for production

npm run build

Submitting a Pull Request

Once you're ready to submit your changes, submit a pull request into the master branch. Often it's a good idea to open an issue to discuss your proposed changes before making a PR, but you're welcome to submit a PR without an issue - just be sure to include a good description of your changes.