Hello David,
in our Project we are migrating from Vaadin 8 to Vaadin 23. In Vaadin 8 we extended the Ace Editor add-on with a self written language (Mode+Snippets).
I looked into the AceEditor class of this add-on and I assume that this is not possible at the moment (e.g. setMode with enum parameter). We also create dynamic mode/snippet files, based on the current opened data object, and push them to the client.
Do you plan to add such a feature in near future?
Or is it already possible and I missed something?
As the source code is fully [open source]
(https://github.com/f0rce/ace), you could easily download it → add your modes and snippets in the /src/main/resources/META-INF/resources/ace-builds/src-min-noconflict directory and include them in the enum.
After that just build a own version that you can use :)
Hello David,
okay, that is one way to achieve this, if possible, I want to avoid this.
At the moment, I am playing around with the attribute/state ‘baseUrl’ and I don’t know how it exactly works.
The javadoc says:
If you want to add your own custom modes/themes make sure to place them under src/main/resources/META-INF/resources and make sure to start your BaseUrl with ace-builds/src-min-noconflict/
Do I have put all existing modes/themes respectively all mode/themes that I want to use in my project in the above mentioned folder or only my own modes/themes? What about snippets?
When I create subfolders in the folder ‘src/main/resources/META-INF/resources’, do I have to add the subfolders to ‘ace-builds/src-min-noconflict/’ in the ‘baseUrl’ property?
May be you can give an example, how to add your own modes/themes/snippets, by using the attribute ‘baseUrl’. I am especially interested in the folder structure in the project and the configuration of the AceEditor component.