verbb / vizy

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

Vizy broken when nested with Neo #192

Closed LiamDotPro closed 1 year ago

LiamDotPro commented 1 year ago

Describe the bug

When trying to use this plugin with neo I get the following error:

Uncaught TypeError: bd.defineSimpleMode is not a function
    at codemirror-editor-vue3.es.js:239:14
    at vizy.cb2fc52f.js:1:637
    at vizy.js:69:2

and the editor is hidden as follows:

image

Steps to reproduce

  1. Install new Craft
  2. Install Neo
  3. Install Vizy
  4. try and add a vizy editor inside a neo block

Craft CMS version

Craft Pro 4.3.6

Plugin version

2.0.10

Multi-site?

No response

Additional context

No response

engram-design commented 1 year ago

Can't seem to replicate this immediately, sorry. Seems to be related to the CodeMirror component we use to edit HTML.

What settings does your Vizy field have - in particular the enabled WYSIWYG buttons?

LiamDotPro commented 1 year ago

hey @engram-design I've tried having a load of differnt options,

current config

  {
      "buttons": ["html", "formatting", "h1", "h2", "h3", "h4", "h5", "h6", "bold", "italic", "underline", "strikethrough", "subscript", "superscript", "ordered-list", "unordered-list", "code-block", "hr", "highlight", "align-left", "align-right", "align-center", "align-justify", "clear-format", "line-break", "link", "image", "undo", "redo"],
      "formatting": ["paragraph", "code-block", "blockquote", "h1", "h2", "h3", "h4", "h5", "h6"],
      "toolbarFixed": true
  }

Althought we've tried it with the base config and also this

  {
      "buttons": ["bold", "italic", "underline", "strikethrough", "subscript", "superscript", "link", "image", "undo", "redo"],
  }

That and of course the default which is where we are at atm

LiamDotPro commented 1 year ago

@engram-design This can be closed, the issue was because we also had the codemirror plugin installed.

engram-design commented 1 year ago

Ah yes, related to https://github.com/verbb/vizy/issues/182 - I should've checked that.