verbb / vizy

A flexible visual editor for Craft CMS
Other
43 stars 8 forks source link

Craft 4 - Codemiror - vizy #182

Closed wmdhosting closed 1 year ago

wmdhosting commented 1 year ago

Describe the bug

Seems some issue With CodeMiror and Vizy when i use vizy field

Drafts cant be saved,.. and craft category / asset modal is not working

here is error. Snag_ca6fa29

When i remove vizy field. .. it work ok..

Steps to reproduce

  1. add https://dev-korisnik.wmd.hr/admin/plugin-store/code-mirror to some filed globals .or anywhere
  2. add vizy field in section..

Drafts cant be saved.. Craft Modal .. just loading. .never finish..

Craft CMS version

4.2.8

Plugin version

2.0.8

Multi-site?

Y

Additional context

No response

engram-design commented 1 year ago

Not sure what we can do about that, these two plugins are incompatible with each other due to how they load CodeMirror, but I'm pretty sure it's down to the fact they load two different versions of CodeMirror, but Vizy tries to load the already-loaded CodeMirror library (through the vue-codemirror library).

To get around this, I would add the missing mode/simple addon in your code-mirror.php plugin settings.

return [
    'addons' => [
        'mode/overlay',
        'mode/simple',
    ]
];