Replies: 11 comments
-
你需要添加一个能够处理 toMarkdown的作用,是将你的prosemirror节点(yy)转换为一个remark节点,然后转换后的remark节点会由remark处理。但是这里你的yy节点remark无法处理(因为这不是一个默认节点类型),因此你需要一个remark插件来处理这种类型的节点。 我推荐你把它转换为remark的directive插件能够处理的类型。 |
Beta Was this translation helpful? Give feedback.
-
那就必须是 |
Beta Was this translation helpful? Give feedback.
-
倒也没有限制,你也可以写一个remark插件,不复杂。可以参考这里: 定义: |
Beta Was this translation helpful? Give feedback.
-
好的,感谢!我看看 |
Beta Was this translation helpful? Give feedback.
-
加了,还是有问题,可以帮忙看看吗?打开后,换行输入 |
Beta Was this translation helpful? Give feedback.
-
因为你生成的remark节点没有children |
Beta Was this translation helpful? Give feedback.
-
具体要怎么改?抱歉,不是很清楚 |
Beta Was this translation helpful? Give feedback.
-
我对remark研究也不深入,不是很清楚,估计要看下别的remark插件怎么写的。 |
Beta Was this translation helpful? Give feedback.
-
看错误不是很像没有 children 的问题,还是原来那个错误,无法识别 Uncaught Error: Cannot handle unknown node yy |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
我一般用issue追踪bug,用discussion继续讨论吧。 |
Beta Was this translation helpful? Give feedback.
-
请问这个可以添加自定义的语法吗?
比如我要加
-d 这是一个红色背景的引用块
,效果是希望显示为一个红色背景的引用块,似乎识别不了, toMarkdown 时会报错:Uncaught Error: Cannot handle unknown nodeyy
。这是我的代码,在 vue2 中使用
Beta Was this translation helpful? Give feedback.
All reactions