查看代码按钮的问题
检查一下[Panel API](https://grapesjs.com/docs/api/panels.html#panels),你用得完全错误......
阅读下方完整回答 ↓问题
我想让设备和菜单按钮都放在同一个面板上,但问题出在查看代码按钮上
如果我移除 'panel.render()' 设备按钮 就会消失
如果我不移除“panel.render()”,查看代码就无法使用
我到底哪里做错了?
回答(2)
检查一下[Panel API](https://grapesjs.com/docs/api/panels.html#panels),你用得完全错误......
谢谢你举报,@mohd7469。 关于查看代码按钮的问题,问得很好。GrapesJS 推荐的方法是使用事件驱动 API。 从这里开始: 查看你所在模块的[GrapesJS文档](https://grapesjs.com/docs/) 寻找“on()”事件监听器方法 大多数操作可以通过监听编辑器和组件事件来实现 常见模式: “JavaScript 留意变化 editor.on('change', () => console.log('something changed')); 组件生命周期 editor.on('component:mount', (c) => console.log('com...
相关问答
通过相似的问题讨论继续研究。
问题 #3142
AssetManager 渲染问题
@artf这正是之前已经被解决过的[问题#2760](https://github.com/artf/grapesjs/issues/2760),这是错了还是我做错了?我本以为资源不会显示出来,但它们全都可见  导致错误
你好, 我正在尝试用这个代码编辑器从面板中移除一个按钮。Panels.removeButton(“options”, “fullscreen”)' 。它移除了按钮,但出现了这个错误。 (arm64) 可复制演示链接 截图:https://d.pr/i/AyHJyL 描述一下那个虫子 如何复现这个漏洞?升级到最新的葡萄品种。 预期的行...
与此问题匹配的付费插件
根据问题关键词和标签相关性精选,助你更快交付。
正在加载付费插件推荐……
相关教程
关于同一主题的深入指南。
教程
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.
浏览插件分类
直接跳转到市场上的插件分类页面。