0xasahi / neogroup

Donation: https://ko-fi.com/neogroup
https://neogrp.club/
MIT License
12 stars 5 forks source link

feat: use richtext editor to create topic #23

Closed anig1scur closed 1 year ago

anig1scur commented 1 year ago

https://anig1scur-special-couscous-rpj9gx76xrxhpg65-8000.preview.app.github.dev/group/1/


先把 slate.js 官方的例子拿过来直接用了 https://www.slatejs.org/examples/richtext

0xasahi commented 1 year ago

👍👍👍 晚上回家仔细看

anig1scur commented 1 year ago

+1+1+1 晚上回家仔细看

晚上回来修了个 bug 😂 我在 codespaces 上起一个测试的

anig1scur commented 1 year ago

有一个问题就是我现在没有找到比较合适的 slate.js 转 markdown 格式的 package (有些语法 markdown 也是不支持) 所以新建 topic 保存的其实是 html , 在经过转 html 这一步骤时它自己不会有什么变化,预览上也区别不大。

但是在 meta 这里会有一点问题 (不好看),可能这里最好从 html 转一下 plain

image