mirror of
https://github.com/suren-atoyan/monaco-react.git
synced 2026-01-25 16:02:35 +00:00
add saveViewState and defaultLanguage for multi-model support
This commit is contained in:
parent
7ed4b7eeaf
commit
e6dbaa57a2
26
src/types.d.ts
vendored
26
src/types.d.ts
vendored
@ -32,10 +32,22 @@ export type OnValidate = (
|
||||
|
||||
export interface EditorProps {
|
||||
/**
|
||||
* The initial value of the default (auto created) model
|
||||
* Default value of the current model
|
||||
*/
|
||||
defaultValue?: string;
|
||||
|
||||
/**
|
||||
* Default language of the current model
|
||||
*/
|
||||
defaultLanguage?: string;
|
||||
|
||||
/**
|
||||
* Default path of the current model
|
||||
* Will be passed as the third argument to `.createModel` method
|
||||
* `monaco.editor.createModel(..., ..., monaco.Uri.parse(defaultPath))`
|
||||
*/
|
||||
defaultPath?: string;
|
||||
|
||||
/**
|
||||
* Value of the current model
|
||||
*/
|
||||
@ -47,11 +59,11 @@ export interface EditorProps {
|
||||
language?: string;
|
||||
|
||||
/**
|
||||
* Path for the default (auto created) model
|
||||
* Path of the current model
|
||||
* Will be passed as the third argument to `.createModel` method
|
||||
* `monaco.editor.createModel(..., ..., monaco.Uri.parse(defaultModelPath))`
|
||||
* `monaco.editor.createModel(..., ..., monaco.Uri.parse(defaultPath))`
|
||||
*/
|
||||
defaultModelPath?: string;
|
||||
path?: string;
|
||||
|
||||
/**
|
||||
* The theme for the monaco
|
||||
@ -82,6 +94,12 @@ export interface EditorProps {
|
||||
*/
|
||||
overrideServices?: monaco.editor.IEditorOverrideServices;
|
||||
|
||||
/**
|
||||
* Indicator whether to save the models' view states between model changes or not
|
||||
* Defaults to true
|
||||
*/
|
||||
saveViewState?: boolean;
|
||||
|
||||
/**
|
||||
* Width of the editor wrapper
|
||||
* Defaults to 100%
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user