我如何自定义Grapesjs的用户界面?
问题
我想自定义 Grapesjs 的界面,但 js 和 css 文件都被压缩了。请告诉我该怎么做?我只是想在界面里保留一些特定的模块,比如图片、文本等。
回答(3)
SASS 用于生成压缩后的 CSS 文件。你可以从这里更改样式变量:src/styles/scss/
@SyedHashimShah https://grapesjs.com/docs/getting-started.html
谢谢你举报,@SyedHashimShah。 关于我如何自定义Grapesjs的用户界面? 这个问题很棒。推荐的 StyleManager 方法是使用事件驱动的 API。 从这里开始: 查看你所在模块的[GrapesJS文档](https://grapesjs.com/docs/) 寻找“on()”事件监听器方法 大多数操作可以通过监听编辑器和组件事件来实现 常见模式: “JavaScript 留意变化 editor.on('change', () => console.log('something changed')); 组件生命周期 editor.on('component:mount'...
相关问答
通过相似的问题讨论继续研究。
问题 #3383
可以把样式包含在HTML里吗?
我目前用 grapesjs 来构建邮件模板,但当我导入带有<style>标签的 HTML 时,在存储之前,HTML 和 CSS 会被拆分。当这些存储在后端数据库时,HTML 里没有 <style> or <link> 标签,而是单独存储。有没有办法防止这种情况,并存储两个版本的...
问题 #3184
点击关于将 grapesjs-style-bg 插件集成到网页构建器的问题
我使用的是 GrapesJS 版本(0.16.27),并且在编辑器中集成了 grapesjs-style-bg 插件。功能完全正常。但点击背景属性的标签页时,问题就出现了。它立刻切换了标签页。 尤其是在选择渐变选项时,我已经集成了插件,正如本[问题](https://githu...
问题 #3198
无法获得内联CSS代码。如何使用这个?
当我运行内联CSS的Command时,它会给我一个警告且未定义。
问题 #3362
双击问题
葡萄 - 0.16.105 当我点击一个元素(表单——该元素已禁用克隆)时,下一个元素(列)会被点击。第一元素克隆到第二元素,失去了所有风格。你能帮我吗? https://user-images.githubusercontent.com/44744754/112153667-...
与此问题匹配的付费插件
根据问题关键词和标签相关性精选,助你更快交付。
正在加载付费插件推荐……
相关教程
关于同一主题的深入指南。
教程
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.
浏览插件分类
直接跳转到市场上的插件分类页面。