Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getHtml() 保存进数据库中 取出来setHtml()赋值进去, table 中的样式比如单元格的颜色样式会丢失 #529

Open
funing1 opened this issue Jan 31, 2025 · 3 comments

Comments

@funing1
Copy link

funing1 commented Jan 31, 2025

bug 描述

getHtml() 保存进数据库中 取出来setHtml()赋值进去, table 中的样式比如单元格的颜色样式会丢失

你预期的样子是?

和设置完 的 编辑器内容 样式一致

系统和浏览器及版本号

  • 操作系统
  • win11
  • 浏览器和版本
  • 火狐浏览器 最新版本

wangEditor-next 版本

wangEditor-next 最新版本 vue2

demo 能否复现该 bug ?

在线demo 没有尝试的地方

在线 demo

最小成本的复现步骤

[复现步骤]

  • 步骤一

基础配置,mouth()方法里初始化 编辑器值
测试值
// 该值为 getHtml获取
String content ='

姓名:{name} ,年龄:{number}


名称编码
{detail.name}{detail.number}


'

this.editor.setHtml (content)

  • 步骤二
    会发现 名称那个单元格设置的 background-color: rgb(245, 219, 77); 这个样式 会丢失!
@funing1
Copy link
Author

funing1 commented Jan 31, 2025

<th colspan="1" rowspan="1" width="auto" style="text-align: center; background-color: rgb(245, 219, 77);">

@funing1
Copy link
Author

funing1 commented Jan 31, 2025

word文档如下:问题描述.docx

@funing1
Copy link
Author

funing1 commented Jan 31, 2025

沙盒可复现,直接赋值即可,这个值是getHtml获取的 ,网络问题有时候登录不了,如图: Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant