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

Using formio with monaco editor causes the builder/renderer to malfunction. #6027

Open
llemire-exp opened this issue Feb 25, 2025 · 0 comments
Assignees

Comments

@llemire-exp
Copy link

Describe the bug

When creating a new instance of the Formio builder or when rendering a form, if I render a monaco editor (through the monaco-editor/react package) all components that need an external library do not work.
for example, if a "date time" component is included in the form, it fails since there is an issue with loading file-pickr or when a text-area has the editor setting as quill or ckeditor.

Version/Branch
latest version: 5.0.1

To Reproduce
Steps to reproduce the behavior:
I have included a small react app in attachement, so you can download it npm install and npm run dev to see the issue

poc-formio-monaco.zip

  1. add a monaco editor inside your page
  2. create a form with a text area component of type ckeditor

Expected behavior
The form with the textarea of type ckeditor should appear.

Screenshots
Here's the result:

Image

The ckeditor is missing

Here's the code used to create this page (included in the attachment)

Image

Additional context
If I delay the rendering of the monaco editor to be after the form has been built, the issue is not present, so it looks like monaco editor does something that has an impact on

In our app we use monaco editor a lot which mean that If a user opens any page with monaco editor before he visits a page with a formio form or the formio builder, it causes problem, for now our only solution is to pre-load all the library needed by formio that should only be loaded when needed.

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

2 participants