每当设置html数据之后,所有的文本自行携带0.65的透明度。
cabinai opened this issue · comments
Cabin AI commented
version
0.9.86
instance.command.executeSetHTML({ header: '', main: '<p style="font-family: 仿宋; text-align: center; font-size: 32px;">下午好</p>', footer: '' });
instance.command.getHTML().main
结果 '<div style="text-align: center;"><span style="font-family: 宋体; text-align: center; **color: rgba(0, 0, 0, 0.65)**; font-size: 32px;">下午好</span></div>'
What is expected?
修正或找出问题
What is actually happening?
0.65的透明度去不掉
Cabin AI commented
会自动添加0.65的透明度,很头疼
Hufe commented
因为你字体颜色设置的有透明度。另外不要使用html作为编辑器交换格式,应该使用标准的编辑器数据结构:https://hufe.club/canvas-editor-docs/guide/schema.html