editablejs / editable

🌱 A collaborative rich-text editor framework that focuses on stability, controllability, extensibility, and performance. 一款强到离谱的富文本编辑器框架,专注于稳定性、可控性、扩展性和性能。
https://docs.editablejs.com
Apache License 2.0
1.8k stars 121 forks source link

转换成html 后,样式不在了 #126

Closed lubingxf closed 1 year ago

lubingxf commented 1 year ago

Description A clear and concise description of what the bug is.

Recording A GIF or video showing the issue happening. (If you don't include this, there's a very good chance your issue will be closed, because it's much too hard to figure out exactly what is going wrong, and it makes maintenance much harder.)

Sandbox A link to a sandbox where the error can be reproduced.

Steps To reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expectation A clear and concise description of what you expected to happen. (Often it's helpful to test out the behavior of other editors like Google Docs, Medium, Notion, etc. to see how they handle the same issue.)

Environment

Context Add any other context about the problem here. (The fastest way to have an issue fixed is to create a pull request with working, tested code and we'll help merge it. Editable is solving a pretty complex problem, and we can't do it without active contributors, so thank you so much for your help!)

big-camel commented 1 year ago

有更详细的描述吗?什么样的样式?什么插件?

lubingxf commented 1 year ago

使用插件@editablejs/serializer/html const html = HTMLSerializer.transformWithEditor(editor) 转html image

big-camel commented 1 year ago

有更明确的表述吗?什么样的样式?预期样式什么样的?

lubingxf commented 1 year ago

预期标签所携带的样式 应该放在style 属性里面

big-camel commented 1 year ago

你所说的样式长什么样?要跟编辑的时候一模一样?这个还没做,你也可以自己定义转换加上样式