Estoy intentando integrar Pixie Editor con Nuxt. Dan el siguiente ejemplo para la inicialización de React:
import React, {useEffect} from "react"; import { Pixie } from "pixie"; export function EditorDemo() { useEffect(() => { Pixie.init({ selector: "#container", baseUrl: "pixie", image: "pixie/images/samples/sample1.jpg", }).then((instance) => { // editor is fully loaded! console.log(instance); }); }, []); return <div id="container" />; }Mi intento de Nuxt no ha tenido éxito, y esencialmente sigo sentado en:
import Vue from 'vue' import { Pixie } from 'pixie' Vue.component('PixieEditor', Pixie)Dentro de mi plantilla Nuxt:
<template> <client-only> <PixieEditor/> </client-only> </template>Errores:
TypeError: class constructors must be invoked with 'new' VueJS 5 render index.vue:11 VueJS 57 NuxtJS 2 Babel 12 NuxtJS 11 client.js:102 [Vue warn]: The client-side rendered virtual DOM tree is not matching server-rendered content. This is likely caused by incorrect HTML markup, for example nesting block-level elements inside <p>, or missing <tbody>. Bailing hydration and performing full client-side render.* Me disculpo por la falta de código. Podría haber agregado un montón de código sin sentido, pero no estoy seguro de por dónde empezar. *