“index.d.ts 不是模块”,在 0.18.4 中,当 grapesjs 被导入时,“import * as grapesjs from 'grapesjs';
问题
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? 铬99 可复制演示链接 没有关联 描述一下那个虫子 如何复现这个漏洞?我在我的typescript angular类中用了grapesjs 0.18.2,导入方式是这样——'import as grapesjs from 'grapesjs';升级至0.18.4版本 预期的行为是什么? 没有错误 目前的行为是什么? Typescript 在“import as grapesjs from 'grapesjs”这行时会抱怨;并出现以下错误: 导入词的“葡萄”部分有红色波浪。我猜这是因为“index.d.ts”是在0.18.4(https://github.com/artf/grapesjs/releases/tag/v0.18.4)中引入的  0.18.3版本没有这个问题。 如果需要执行某些代码以重现该漏洞,请将其粘贴到下面: “''t” import * as grapesjs,源自“grapesjs”; ```行为准则 [X] 我同意遵守本项目的行为准则
回答(3)
应该在这里解决 https://github.com/artf/grapesjs/pull/4216 我想你应该在当前版本中禁用TS。
@artf 我用的是Grapesjs最新版本 ^0.18.4 我安装了 NPM Grapesjs 来运行,index.d.ts文件上出现了错误,能不能请你更新一下问题 NPM安装:  手动更改本地:  寻找“on()”事件监听器方法 大多数操作可以通过监听编辑器和组件事件来实现 常见模式: “JavaScript 留意变化 editor.on('change', () => console.log('somethi...
相关问答
通过相似的问题讨论继续研究。
问题 #4575
AssetManagerConfig 中缺少自定义功能
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? 铬 可复制演示链接 这是一个编译错误 描述一下那个虫子 AssetManagerConfig 中缺少属性自定义。 如果我用未分类的葡萄,它能行,但我想用它来搭配类型。有没有解决这个问题的解决办法?...
问题 #3463
检查员溢出故障
警告 请阅读并遵循接下来的三步,然后在发布问题前删除它们遵守贡献指南 https://github.com/artf/grapesjs/blob/master/CONTRIBUTING.md先快速搜索一下,看看有没有人没开同样的问题所有相关陈述/问题都必须填写/回答,否则问题可...
问题 #4195
如果在文本块中粘贴第二次,文本会消失
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? 铬99 可复制演示链接 https://grapesjs.com/demo.html 描述一下那个虫子 如何复现这个漏洞?打开 https://grapesjs.com/demo.html 并删除...
问题 #4388
按钮特性命令无法使用
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? 任何浏览器 可复制演示链接 https://jsfiddle.net/sohrabi2050/yrL2aqft/ 描述一下那个虫子 特征按钮命令在 v [v0.18.4](https://gith...
与此问题匹配的付费插件
根据问题关键词和标签相关性精选,助你更快交付。
正在加载付费插件推荐……
相关教程
关于同一主题的深入指南。
教程
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.
浏览插件分类
直接跳转到市场上的插件分类页面。