Office
A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.
1,917 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
How to paste a SVG image to Word from Web (the Async Clipboard API)?
const clipboardData = {};
const blobSvg = new Blob([svgText], {type:'image/svg+xml'}
try {
console.log(clipboardData)
await navigator.clipboard.write([
new ClipboardItem(clipboardData),
]);
} catch (err:any) {
console.error(err.name, err.message);
}
Word did not accept it. Something wrong with encoding type content ofimage/svg+xml
Other info:
image/svg+xml
,which is binary data.(with the help of web online tool) image/svg+xml
in Office?How many html elements are supported by microsoft_365?
Currently, i know that element for div
,table
... is supported paste to office and preserve style , by set text/html
in ClipboardItem
Is there a official list for html element supported paste in office?