I was trying to insert html into the office365 word document and using insertHtml
method. insertHtml
inserts an empty content control (shows placeholder instead of my html).
A problem can be reproduced on iPad iOS 11.3 browsers Safari and Chrome. Native word application on the iPad and other devices (office365 word and native word) are inserting correctly.
Example of the code:
Word.run(async context => {
const currentRange = context.document.getSelection();
const control = currentRange.insertContentControl();
control.insertHtml(
'<b>Insert any text to test</b>',
Word.InsertLocation.replace,
);
await context.sync().catch(console.error);
})
Any help would be appreciated.
from insertHtml on IPad inserts empty content control
No comments:
Post a Comment