React-ace: misspelled options - again!

Created on 19 Oct 2018  ·  5Comments  ·  Source: securingsincity/react-ace

Problem

Problem reported here https://github.com/securingsincity/react-ace/issues/95 was believed to be fixed, but unfortunately still occurs:
Getting some warnings in console:
misspelled option "enableBasicAutocompletion"
misspelled option "enableLiveAutocompletion"

Detail the problem here, including any possible solutions.

Remedy for this problem was supposedly this PR https://github.com/securingsincity/react-ace/pull/127, but it solved only some cases - for others, problem still happens.

Based on error details, similar changes as in that PR https://github.com/securingsincity/react-ace/pull/127/files should also be applied here: https://github.com/securingsincity/react-ace/blob/87bd672673d344d7e3eb3d5ec0ec0308c2223a3e/src/ace.jsx#L181

Sample code to reproduce your issue

Just use editor with some options, ie:

<AceEditor
  setoptions={{
    enableBasicAutocompletion: true,
    enableLiveAutocompletion: true,
    enableSnippets: true
  }}
/>

and make sure, that componentDidUpdate was triggered.

References

Progress on: #

Most helpful comment

Closing - this issue can be solved by adding import 'brace/ext/language_tools';

All 5 comments

Closing - this issue can be solved by adding import 'brace/ext/language_tools';

I solved it by following:

import "ace-builds/src-noconflict/ext-language_tools";

@ziishaned this import does not seem to fix it for me. What are your imports and what order?

@ziishaned Thanks it worked. I upgrade "react-ace": "6.3.2" to "react-ace": "^9.2.1".

Thus react-ace does no longer use brace package from v8 onwards.

https://github.com/securingsincity/react-ace/issues/638#issuecomment-649181737

Therefore had to import extension tools package from "ace-builds/src-noconflict/ext-language_tools";

Migration Guide from v6 -> 8
https://github.com/securingsincity/react-ace/blob/main/docs/Migrate-v7-to-v8.md

@gone-skiing
import 'ace-builds/webpack-resolver';
import 'ace-builds/src-noconflict/mode-java'; (for theme purpose)
import 'ace-builds/src-noconflict/ext-language_tools';

...
Worked for mine.

Was this page helpful?
0 / 5 - 0 ratings