If one adds an annotations as a prop to the react ace component. They only get shown until I add a newline to the value. To show that problem I changed the example. The only thing I changed is adding annotations to the example/index.js in line 29. annotations={[{ row: 5, column: 2, type: 'error', text: 'Some error.'}]}.
I got it to work if I put the render on line 24 into a function and call that function with the newValue Full change starting on line 19
function onChange(newValue) {
console.log('change', newValue);
renderFirst(newValue);
}
function renderFirst(value = '') {
// Render first editor
render(
<AceEditor
mode="java"
theme="github"
name="blah1"
value={value}
annotations={[{ row: 5, column: 2, type: 'error', text: 'Some error.'}]}
height="6em"
onChange={onChange}
/>,
document.getElementById('example')
);
}
renderFirst();

I hope the description is clear, and I hope this is not me using the component wrong. Thanks in advance.
I know I'm late to the party, but this might help: Try to set editorProps={{$useWorker: false}} on the editor component. This disables Ace's internal annotations and prevents it from overriding custom annotations after newlines.
@Poltergeist did @leMaik 's advice fix the issue
Well, at least it fixed the very same issue for me. :wink:
Sadly I never got back to test it, I try to test it asap.
Maik Marschner [email protected] schrieb am Fr., 23. Sep. 2016 um
14:46 Uhr:
Well, it fixed the very same issue for me. 😉
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/securingsincity/react-ace/issues/129#issuecomment-249182559,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJhajW15nV7Mz7yagzCCX5iL5w4WfAIks5qs8oagaJpZM4JMXso
.
I am getting the expected annotations but the hover effect is not there.
It displays nothing when I hover over the cross, no "text" .
Can anyone help?
In latest version 4.2.3 using the example, I am unable to reproduce this bug. I believe it's been resolved.
Sadly, I am reproducing this again.
I have this code:
editor.$useWorker = false;
Whenever cursor leaves or enters the line with custom annotation added, the annotation vanishes.
Cursor can move freely and even add newlines without touching the annotated line. Once it hits it, the annotation disappears.

Is there any update on this? I am experiencing the same issue as described by @mikolajpp Thanks
I have this problem too. @abrarmahmood, @mikolajpp did you ever figure out why this is happening? The various ways of setting useWorker=false did not work for me.
You need to set the $useWorker on the session:
editor.session.$useWorker = false;
I am wondering if there is a way around this because setting useWorker = false disables ace syntax checking and that's not what I want. I want to merge my annotations to the ace's ones.
@hamoody-omar The following answer allows you to use custom annotations alongside the Workers annotations: https://github.com/securingsincity/react-ace/issues/483#issuecomment-493821013