Wirecloud / wirecloud

Widgets Container and Mashup edition tools. Reference implementation of the FIWARE Application Mashup GE
https://wirecloud.rtfd.io/
Other
60 stars 45 forks source link

Add `CodeArea` to Wirecloud #537

Closed oxixes closed 4 months ago

oxixes commented 6 months ago

Proposed changes

Adds a CodeArea styled element that is a full-fledged code editor supporting syntax highlighting of many languages and code completion of a few. Additionally, this allows the use of CodeArea as a preference type for widgets/operators (allowing to specify the language) as well as TextArea.

For this to be possible, the monaco editor has been used (MIT License), which is the same that VS Code uses (it is extracted from its source code). In case monaco fails to load, the CodeArea will be a simple TextArea.

Types of changes

What types of changes does your code introduce to the project:

Checklist

Further comments

For monaco to be loaded, webpack has been used. A script was created so that a single command (docs in README) can build monaco and prepare it for Wirecloud.

~This is still a work in progress, as tests are still missing.~ This is ready for review.

Happy coding!

coveralls commented 6 months ago

Coverage Status

coverage: 88.985% (+0.001%) from 88.984% when pulling 20dd55e9413cbc875002bcb996dcce4e19965898 on oxixes:v2-editor into 01e171aa34fcf4b81b39c4aae8734b931bc35cb9 on Wirecloud:develop.