Questions tagged [react-ace]

44 questions
1
vote
3 answers

Disable any user input using ReactQuill library

I'm trying to use ReactQuill just to show some rich text that I have, and therefore I don't want that it can receive any input or typing from the user. Reason, I have another library (ReactAce), and ReactQuill is causing a bug that when I type the…
Otavio Augusto
  • 316
  • 3
  • 9
1
vote
1 answer

Enable Python syntax validation/checker in ace editor

In my web app, I'm using an ace editor with python mode as below: var editor =…
Jayavel
  • 3,377
  • 2
  • 21
  • 35
1
vote
2 answers

How to specify a list of custom tokens to list for autocompletion in Ace Editor?

After following the setup for autocompletion with Ace Editor, I have it working with react-ace. However, I need some custom tokens to be available in the built-in autocomplete list. The repository for react-ace has these properties defined as…
Yanick Rochon
  • 51,409
  • 25
  • 133
  • 214
1
vote
2 answers

loading css/javascript file based on prop

I am working a reactjs file that uses the react-ace library. Currently my code looks like this import React, { Component } from 'react'; import 'brace/mode/html'; import 'brace/theme/monokai'; import AceEditor from 'react-ace'; class AceHTML…
Robert E. McIntosh
  • 5,557
  • 4
  • 26
  • 35
1
vote
1 answer

Manually adding snippets to react-ace editor

Is it possible to manually add snippets through react-ace component. For example, adding snippet myFun to javascript: # Function snippet myFun function ${1?:function_name}(${2:argument}) { let x = 'test'; ${3:// body...} …
Dennis Vash
  • 50,196
  • 9
  • 100
  • 118
1
vote
0 answers

Cannot read property 'acequire' of undefined

Jest test failing with Test suite failed to run TypeError: Cannot read property 'acequire' of undefined at Object. (node_modules/ace-diff/src/index.js:12:35) Saw similar issues at securingsincity/react-ace#179, securingsincity/react-ace#230 for…
1
vote
1 answer

Ace editor. Set current edits state as base

I'm using ace editor wrapped by react-ace for my project. How can I destroy all undo/redo history in certain moment when I need it? I've tried this.aceRef.editor.destroy(); (just react ref bound with editor), but unfortunately it doesn't play well…
WebArtisan
  • 3,996
  • 10
  • 42
  • 62
0
votes
0 answers

How to import ace-builds for react-ace into NextJS

The situation is as follows. I want to use react-ace in the next component. But this lib swears that she doesn't see the window object. Then I imported this library using dynamic from next/dynamic. OK, the library is working. But it needs…
0
votes
1 answer

Using react-ace with CDN and without webpack or similar tool

I found myself on a React project that uses the Scorm API to interface with the Canvas LMS. Now I want to import the react-ace library but apparently Canvas doesn't like bundlers. I know someone had similar issues for example with React Router, but…
0
votes
0 answers

How can I change text color of selected functions or fields in react-ace

I'm trying to use react-case for my editor where I've defined a custom set of "Functions" and 'Fields" to be used in auto-complete. I want to change the color of the function or field as it displays in the Editor, but can't get it to work. Here is…
mike hennessy
  • 1,359
  • 1
  • 16
  • 35
0
votes
0 answers

React aces show syntax errors

I'm trying to figure out how to get javascript syntax validation in myreact-ace editor. But the docs don't seem to cover how to do this? I though that the onValidation() prop would provide a list of errors whenever the editor updates, but in the…
ANimator120
  • 2,556
  • 1
  • 20
  • 52
0
votes
0 answers

react-ace code editor not working when defining a function based on code editor text

I'm trying to integrate react-ace into my code. The goal is to use the text contained into the code editor to create a function. For this, I'm defining a AceEditor, and everytime a change occurs I take the text into the editor and define the…
FGP92
  • 43
  • 6
0
votes
1 answer

React Ace Selection Change Event Not Getting Trigger

Ace Control Code:
A_Sk
  • 4,532
  • 3
  • 27
  • 51
0
votes
1 answer

React-ace - Get cursor position

I was checking ace editor docs & found that, editor.getCursorPosition() retrieves the current cursor position. But how do I do this in react-ace. I'm not sure, how to get the editor instance & call getCursorPosition() function over it. I checked…
0
votes
1 answer

How to use ace/ext/language_tools singleton in react-ace to avoid completers override/addition?

I am using two script editors (based on AceEditor) within one form, each uses separate completer. Currently completer is instantiated inside a component like this: const langTools =…
jckmlczk
  • 359
  • 4
  • 11