feature request: option to disable document normalization on editor initialization
See original GitHub issueslate editor constructor includes:
// Run `onChange` on the passed-in value because we need to ensure that it
// is normalized, and queue the resulting change.
const change = props.value.change()
stack.run('onChange', change, this)
this.queueChange(change)
this.state.value = change.value
While this is great in general, when dealing with big, complex documents, the normalization of the all document can be very long (a few seconds). It would be awesome if we can add an option prop that disable the initial value validation/normalisation. Obviously, in this case, the responsibility of ensuring the supplied value it valid moves to the developer.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Language Server Protocol Specification - 3.17
This document describes the 3.17.x version of the language server protocol. ... is exchanged between the client and server during the initialize request....
Read more >Cannot find reference 'xxx' in __init__.py - Stack Overflow
To fix, in Settings > Editor > File Types , in the "Recognized File Types" list click on "Text" and in the "File...
Read more >Mask Editor Overview - MATLAB & Simulink - MathWorks
The Mask Editor dialog box helps you create and customize the block mask. The Mask Editor dialog box opens when you create or...
Read more >modules/libpref/init/StaticPrefList.yaml ... - mozilla-central
Find changesets by keywords (author, files, the commit message), revision number or hash, or revset expression. modules/libpref/init/StaticPrefList.yaml ...
Read more >VS Code API | Visual Studio Code Extension API
The notebooks functionality is composed of three loosely coupled components: NotebookSerializer enable the editor to open, show, and save notebooks ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is this documented anywhere on https://docs.slatejs.org/ I couldn’t really find anything relevant when searching for “normalize”.
Also, is there a utility function to normalize a document, ideally without a whole editor instance e.g. for passing a normalized document to the editor while
normalize: false
is set?Would definitely appreciate this option, as mentioned normalization can hang the browser window for a few seconds. If I can guarantee that the content was previously saved out of Slate then this step seems like it could be skipped for a better user experience.