如何在预览模式下移除眼部斜杠按钮?
>我建议用[extending](https://grapesjs.com/docs/modules/Commands.html#extending)原始的[预览](https://github.com/artf/grapesjs/blob/dev/src/commands/view/Preview.js)命令感谢你的回复@artf。有没有关于扩展现有命令的文档或示例代码? https://grapesjs.com/docs/modules/Commands.html#extending
阅读下方完整回答 ↓问题
你好@artf!我用 GrapesJS 创建了一个网页构建器。 我想在预览模式下移除眼部斜视按钮,改用返回按钮。怎么做?请帮帮我。
回答(4)
我建议用[extending](https://grapesjs.com/docs/modules/Commands.html#extending)原始的[预览](https://github.com/artf/grapesjs/blob/dev/src/commands/view/Preview.js)命令
感谢你的回复@artf。有没有关于扩展现有命令的文档或示例代码?
@niveth09这里是扩展预览命令(不含眼睛按钮)的代码:
谢谢你举报,@niveth09。 关于如何在预览模式中移除眼部斜杠按钮?的好问题。GrapesJS 推荐的方法是使用事件驱动 API。 从这里开始: 查看你所在模块的[GrapesJS文档](https://grapesjs.com/docs/) 寻找“on()”事件监听器方法 大多数操作可以通过监听编辑器和组件事件来实现 常见模式: “JavaScript 留意变化 editor.on('change', () => console.log('something changed')); 组件生命周期 editor.on('component:mount', (c) => console.l...
相关问答
通过相似的问题讨论继续研究。
问题 #3250
问题:图层标签
@artf我很喜欢和GJS合作。我还有最后一件事希望你能帮忙。 如果能在图层管理器中自定义标签会非常有帮助。我到处找过,但都没找到。 默认显示“文本”和“框”的方式,对于想要高效导航来说帮助不大。 <img width=“204” alt=“截图 2021-01-28 07 2...
问题 #3285
:画布iframe中的文档类型
嗨。 这个问题已经被问过两次([这里](https://github.com/artf/grapesjs/issues/973)和[这里](https://github.com/artf/grapesjs/issues/1230)),但从未有过答案。 有没有办法在画布ifram...
问题 #3367
模态模板
有没有办法修改已编译状态的模板? https://github.com/artf/grapesjs/blob/d3256e621bb43a537213ffcd86b10dc0bd070c0b/src/modal_dialog/view/ModalView.js#L1-L16 如...
问题 #3721
用Cypress测试拖拽
你好,@artf。我想用Cypress工具在GrapesJs上运行一些测试场景。但我无法用Cypress模拟拖拽模式。你能帮帮我吗? 谢谢。
与此问题匹配的付费插件
根据问题关键词和标签相关性精选,助你更快交付。
正在加载付费插件推荐……
相关教程
关于同一主题的深入指南。
教程
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.
浏览插件分类
直接跳转到市场上的插件分类页面。