远程存储问题
问题
你好,
grapeJs 启动,我通常会加载函数调用并附加内容到 gjs div,
$.Ajax({ 类型:“GET”, 网址:”
processData: false, contentType: 'application/json;charset=utf-8', DataType:“json”, $.each(data, function (key, data) { $('#gjs').append(html); } }); 我的问题是,保存内容后,重新加载同样的功能调用不起作用。 如何简单调用保存/加载功能?
请指引我
回答(2)
感谢你报告,@san-123。 关于远程存储问题的好问题。GrapesJS 推荐的方法是使用事件驱动 API。 从这里开始: 查看你所在模块的[GrapesJS文档](https://grapesjs.com/docs/) 寻找“on()”事件监听器方法 大多数操作可以通过监听编辑器和组件事件来实现 常见模式: “JavaScript 留意变化 editor.on('change', () => console.log('something changed')); 组件生命周期 editor.on('component:mount', (c) => console.log('componen...
相关问答
通过相似的问题讨论继续研究。
问题 #3136
再创建一个 JSON 键
{“type”: “text”,“状态”:“悬停”,“内容”:“请在此插入您的文本”,“属性”:{“id”: “ixx2” },“activeOnRender”: 0,“open”:假 } 在 JSON 里我想添加带有对象的新键。示例 data 键,这里会有自定义特性。我想添加...
问题 #4606
“Commponent & JS”文档页面上的脚本延迟错误。
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? 与问题无关 可复制演示链接 https://grapesjs.com/docs/modules/Components-js.html#basic-scripts 描述一下那个虫子 嘿,与其为这么小...
问题 #4001
当第一次输入的自动值时,无法保持当前单位
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? 96.0.4664.93 可复制演示链接 https://grapesjs.com/demo.html 描述一下那个虫子 如何复现这个漏洞?创建新块,例如Text块导航维度>宽度(默认为自动)换成...
问题 #5891
在Ubuntu 24.04 LTS上安装Grapesjs和yarn
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? Firefox 125.0.3,Brave 1.66.110 可复制演示链接 https://jsfiddle.net/szLp8h4n 描述一下那个虫子 按照“git”指令在终端执行“yarn...
与此问题匹配的付费插件
根据问题关键词和标签相关性精选,助你更快交付。
正在加载付费插件推荐……
相关教程
关于同一主题的深入指南。
教程
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.
浏览插件分类
直接跳转到市场上的插件分类页面。