-
-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Labels
Description
I'm have HTML text in a variable (e.g. const html = '<strong>Hello <em>world</em></strong>';).
When I'm copying this variable using clipboardService.copyFromContent:
const html = `
<h1>Just a title</h1>
<p>
<strong>Hello <em>world</em></strong>
</p>
`
this.clipboardService.copyFromContent(html, this.renderer);Then paste it into a mail the pasted text is
<h1>Just a title</h1><p><strong>Hello <em>world</em></strong></p>
Is there a way to copy text as HTML so it stays formatted when pasted, i.e. having the titles in big font size, bold text, italic, etc.
On a previous project on AngularJS, I was using https://www.npmjs.com/package/clipboard-js (not https://www.npmjs.com/package/clipboard) and it was working fine, so maybe it can be possible with this library as well ?
maxisam, entith and Trirandom