压缩的getJs issue
谢谢你举报,@xinnai。 关于压缩的getJ's问题,这是个很好的问题。GrapesJS 推荐的方法是使用事件驱动 API。 从这里开始: 查看你所在模块的[GrapesJS文档](https://grapesjs.com/docs/) 寻找“on()”事件监听器方法 大多数操作可以通过监听编辑器和组件事件来实现 常见模式: “JavaScript 留意变化 editor.on('change', () => console.log('something changed')); 组件生命周期 editor.on('component:mount', (c) => console.log('component ready', c...
阅读下方完整回答 ↓问题
@artf 你好,我不确定你是否理解我的问题。 我想在我自己的 js 编辑器里编辑 js 代码,首先我用 'getJs(') 从你的编辑器里设置了 js 代码,但你demo.html里看起来是这样的:  这些代码都是压缩的。我想要像这样一个未压缩的代码,格式为[https://github.com/Ju99ernaut/grapesjs-script-editor](URL)  为此,我阅读了“grapesjs-script-editor”中的源代码,学习如何获得未压缩的 js 代码。但我只找到了以下这个代码: getCodeViewer() { const { editor } = this; 如果 (!this.codeViewer) { this.codeViewer = 编辑器。CodeManager.createV...
回答(1)
谢谢你举报,@xinnai。 关于压缩的getJ's问题,这是个很好的问题。GrapesJS 推荐的方法是使用事件驱动 API。 从这里开始: 查看你所在模块的[GrapesJS文档](https://grapesjs.com/docs/) 寻找“on()”事件监听器方法 大多数操作可以通过监听编辑器和组件事件来实现 常见模式: “JavaScript 留意变化 editor.on('change', () => console.log('something changed')); 组件生命周期 editor.on('component:mount', (c) => console.log(...
相关问答
通过相似的问题讨论继续研究。
问题 #4094
在Chrome的编辑器中拖放块时,无法拖放块块
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? 版本 97.0.4692.71(官方构建)(64位) 可复制演示链接 https://grapesjs.com/demo.html 描述一下那个虫子 如何复现这个漏洞?在编辑器中拖放基本方块 预期...
问题 #4921
[X] 我确认使用最新版本的GrapesJS
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? Chrome 版本 110.0.5481.78(官方构建)(64 位) 可复制演示链接 https://grapesjs.com/demo.html 描述一下那个虫子 如何复现这个漏洞?安装带有n...
问题 #3142
AssetManager 渲染问题
@artf这正是之前已经被解决过的[问题#2760](https://github.com/artf/grapesjs/issues/2760),这是错了还是我做错了?我本以为资源不会显示出来,但它们全都可见 ![图片](https://user-images.githubus...
问题 #3250
问题:图层标签
@artf我很喜欢和GJS合作。我还有最后一件事希望你能帮忙。 如果能在图层管理器中自定义标签会非常有帮助。我到处找过,但都没找到。 默认显示“文本”和“框”的方式,对于想要高效导航来说帮助不大。 <img width=“204” alt=“截图 2021-01-28 07 2...
与此问题匹配的付费插件
根据问题关键词和标签相关性精选,助你更快交付。
正在加载付费插件推荐……
相关教程
关于同一主题的深入指南。
教程
How to Build an AI-Powered Page Builder with GrapesJS in 2026
What we learned building GJSDocs — from simple AI text generation to structured, context-aware visual editing
教程
How Much Does It Cost to Build a SaaS Page Builder in 2026?
How much does it cost to build a SaaS page builder in 2026? Explore realistic development costs, timelines, features, and how using GrapesJS can reduce
教程
PageKit: the GrapesJS application you'd have to build anyway
A source-available Next.js app around the open-source GrapesJS core — publishing, custom domains, leads, checkout and a plugin loader.
浏览插件分类
直接跳转到市场上的插件分类页面。