自定义块类别问题
问题
你好, 我想在块的类别中添加属性,但这些属性没有应用。
回答(4)
@artf有什么建议吗?
请详细说明你想达到的效果。
我想在块的分类上添加一个 html 属性,比如 Basic Category 。 类似这样的内容 
谢谢你举报,@MariusDK。 关于自定义块类别问题的好问题。GrapesJS 推荐的方法是使用事件驱动 API。 从这里开始: 查看你所在模块的[GrapesJS文档](https://grapesjs.com/docs/) 寻找“on()”事件监听器方法 大多数操作可以通过监听编辑器和组件事件来实现 常见模式: “JavaScript 留意变化 editor.on('change', () => console.log('something changed')); 组件生命周期 editor.on('component:mount', (c) => console.log('compo...
相关问答
通过相似的问题讨论继续研究。
问题 #6654
富文本编辑器无法激活
GrapesJS版本 [x] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? 铬V91 可复制演示链接 https://codepen.io/asenper/pen/QwNMwpV 描述一下那个虫子 我本以为点击文本时RTE会打开,但什么都没发生。 这是个bug,还...
问题 #3195
无法在 Grapesjs 下加载 JavaScript
Grapesjs面板下的JavaScript能加载吗?
问题 #3250
问题:图层标签
@artf我很喜欢和GJS合作。我还有最后一件事希望你能帮忙。 如果能在图层管理器中自定义标签会非常有帮助。我到处找过,但都没找到。 默认显示“文本”和“框”的方式,对于想要高效导航来说帮助不大。 <img width=“204” alt=“截图 2021-01-28 07 2...
问题 #6180
Trait 的“setValue()”方法在值变更时不会被调用
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? Chrome最新款 可复制演示链接 https://codesandbox.io/p/sandbox/withered-rgb-xmw8gk 描述一下那个虫子 如何复现这个漏洞?开放代码沙盒选择“...
与此问题匹配的付费插件
根据问题关键词和标签相关性精选,助你更快交付。
正在加载付费插件推荐……
相关教程
关于同一主题的深入指南。
教程
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.
浏览插件分类
直接跳转到市场上的插件分类页面。