Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ace theme+mode+worker file locations? #7

Open
marcelhallmann opened this issue Apr 5, 2013 · 5 comments
Open

Ace theme+mode+worker file locations? #7

marcelhallmann opened this issue Apr 5, 2013 · 5 comments

Comments

@marcelhallmann
Copy link

Hi,

thank you for updating the aceeditor for vaadin7.
Maybe I found a bug:
When I have text in the AceEditor and set the cursor on a line, the whole line is not highlighted (as it has been in old vaadin6 version).

Bug? Or did i forget to set a needed option?

@ahn
Copy link
Owner

ahn commented Apr 5, 2013

Do you mean this light blue/gray line on the cursor line in this picture? That should be there by default, works for me in here. Or do you mean something else?
linehighlight

@marcelhallmann
Copy link
Author

@ahn
Hi,

yes, thats the highlighted line I mean.
When I try your online demo it works for me, too, but I’m not sure if the online demo already is V7 or still V6?

Here’s my code snippet:
this.aceeditor = new AceEditor();
this.aceeditor.setValue("text" +
"text" +
"text" +
"text");
this.aceeditor.setMode(AceMode.textile);
this.aceeditor.setTheme(AceTheme.eclipse);

And here the result:

ace

@ahn
Copy link
Owner

ahn commented Apr 5, 2013

Yes, now I've seen this bug myself.

The demo is Vaadin 7 but it hosts its own Ace theme files, that's why it works.

By default the Vaadin 7 AceEditor reads the required theme/mode/worker files from the same location as this Ace tutorial. The files are probably of different version than the Ace of the current Vaadin AceEditor or something, and that may be why the highlight line doesn't show.

I don't have time to take a look at this deeper now, but for now you can host your own theme/mode/worker files as descriped in "Ace file paths" chapter here to get the themes to properly work. I recommend using the Ace files of the Directory download package.

@marcelhallmann
Copy link
Author

@ahn
Thanks a lot for your help, the hightlight works now for me.

But I found another issue:
Add a textfield and a button to the page and an listener to the button. Within the listener read the value from the textfield and call aceeditor.setCursorPosition().

To reproduce the behavior start the webapp and go to the page, but do not click in the aceeditor!
Type in 15.
When you click now onto the button, the second line will be selected, which is not correct, it should be the thrid line.
But, when you click into the aceeditor it works correctly (reload the page).

Here you see screenshots:
without clicking into the aceeditor
without_click

and with clicking into it
with_click

@Sudhansu9269
Copy link

Hi,
I am new In vaadin ace editor. i added ace editor in my application. but enter key is not working. the cursor only in first line can u help me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants