本帖最后由 Lynn.Dou 于 2024-4-30 17:04 编辑
调研编号:SJS-24054
【v17】clipboardPaste仅粘贴格式无效
- const designer = new GC.Spread.Sheets.Designer.Designer(document.getElementById("gc-designer-container"));
- const spread = designer.getWorkbook();
- const sheet = spread.getActiveSheet();
- spread.options.scrollByPixel = true;
- spread.options.scrollbarShowMax = true;
- spread.options.scrollbarMaxAlign = true;
- spread.commandManager().execute({
- cmd: "clipboardPaste",
- sheetName: 'Sheet1',
- fromSheet: null,
- fromRanges: null,
- pastedRanges: sheet.getSelections(),
- isCutting: false,
- clipboardText: '123 发撒地方撒的',
- clipboardHtml: `<table gc-sjs-clipboard="true" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-variant-alternates: inherit; font-variant-position: inherit; font-stretch: inherit; font-size: 16px; line-height: inherit; font-family: PingFangSC-Regular; font-optical-sizing: inherit; font-kerning: inherit; font-feature-settings: inherit; font-variation-settings: inherit; font-weight: 400; vertical-align: baseline; border-collapse: collapse; border-spacing: 0px; color: rgb(102, 102, 102); letter-spacing: normal; orphans: 2; text-align: start; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; min-width: 1px; min-height: 1px;"><tbody style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; font-optical-sizing: inherit; font-kerning: inherit; font-feature-settings: inherit; font-variation-settings: inherit; font-weight: 400; vertical-align: baseline;"><tr style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; font-optical-sizing: inherit; font-kerning: inherit; font-feature-settings: inherit; font-variation-settings: inherit; font-weight: 400; vertical-align: baseline;"><td class="sjs1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font: bold 11.02pt PingFangSC-Regular; vertical-align: middle; background-color: rgb(145, 213, 255); color: rgb(51, 51, 51); white-space: normal;">123 发撒地方撒的</td></tr></tbody></table>`,
- pasteOption: 2
- });
复制代码
|
|