压缩的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),这是错了还是我做错了?我本以为资源不会显示出来,但它们全都可见 ) 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.
浏览插件分类
直接跳转到市场上的插件分类页面。