方块不能拖到画布上

阅读下方完整回答 ↓问题
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? 陶瑞 可复制演示链接 描述一下那个虫子 如何复现这个漏洞?... 预期的行为是什么? ... 目前的行为是什么?** ... 如果需要执行某些代码以重现该漏洞,请将其粘贴到下面: “''js “使用客户端” import { useEffect, useRef, useState } from “react” import { usePathname, useSearchParams } from “next/navigation” 从 “@/atoms/projects” 导入 { Project, ProjectsAtom } import { useAtom } from “jotai” import grapesjs, { Editor } from 'grapesjs' 导入 'Grapesjs/dist/css/grapes.min.css' export default 函数 Project() { const ref = useRef(null) const i = useSearchParams() const [projects, setProjects] = useAtom(ProjectsAtom) const [project,setProj]= useState<Proj...
回答(4)

我刚发现是因为 WebView2。Webview2 的支持??!
我觉得这更多是因为Tauri配置的问题,而不是GrapesJS,因为我们用的是原生的HTML5拖放功能
谢谢你举报,@DanavsSite。 关于方块不能拖到画布这个问题问得很好。推荐的 StyleManager 方法是使用事件驱动的 API。 从这里开始: 查看你所在模块的[GrapesJS文档](https://grapesjs.com/docs/) 寻找“on()”事件监听器方法 大多数操作可以通过监听编辑器和组件事件来实现 常见模式: “JavaScript 留意变化 editor.on('change', () => console.log('something changed')); 组件生命周期 editor.on('component:mount', (c) => consol...
相关问答
通过相似的问题讨论继续研究。
问题 #5372
无法添加自定义AtRule(@container,@font面)
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? Windows、Chrome、React 可复制演示链接 / 描述一下那个虫子 当尝试添加自定义 atRules 如 @container 或 @font-face 时,CSS 总是编译成 @me...
问题 #4529
当我们用类“xyz”调整图片大小时,页面上同一类的所有元素也会被调整大小,因为编辑器会给这些类添加css。
葡萄JS版本[X] 我确认使用最新版本的GrapesJS你用的是什么浏览器? 版本 104.0.5112.101(官方构建)(arm64)视频演示链接 https://d.pr/i/27EgH2描述一下那个虫子当我们调整带有“xyz”类的图片大小时,页面上所有同类元素也会被调整...
问题 #3679
设备宽度默认无效
感谢#3673 我收到了一个新的bug反馈。 版本:。 0.17.22 你能重现演示中的bug吗?[ ] 是的[ ] 不 预期的行为是什么? 我希望默认宽度是移动设备的宽度,所以我设置了最小宽度优先级,但选择框默认显示的是移动宽度,页面宽度没有变化。我用的是editor.set...
问题 #6663
符号在逐步加载页面时会断裂(实例丢失__symbol链接)
这里有一段展示这个bug的视频: https://github.com/user-attachments/assets/0fdc76ed-cee5-4481-98b1-cbbf52572b31 GrapesJS版本 [x] 我确认使用最新版本的GrapesJS 你用的是什么浏览...
与此问题匹配的付费插件
根据问题关键词和标签相关性精选,助你更快交付。
正在加载付费插件推荐……
相关教程
关于同一主题的深入指南。
教程
GrapesJS DevTools: A Developer Panel Inside Your Editor
If you've ever debugged GrapesJS with console.log(editor.getSelected()) and a dozen throwaway event listeners — this post is for you.
教程
How to Build a Production GrapesJS Editor: The Complete Walkthrough of Brief, Preset, Plugins, and Services
A complete walkthrough of building a production GrapesJS editor: how to choose a preset, pick plugins, and scope setup services without burning a sprint.
教程
Big Updates: TinyMCE 8 and Placeholder 2.0 for GrapesJS
In May we shipped major updates to two of our most popular GrapesJS plugins — TinyMCE Inline Text Editor and Placeholder.
浏览插件分类
直接跳转到市场上的插件分类页面。