<script src="https://raw.githack.com/eKoopmans/html2pdf/master/dist/html2pdf.bundle.js"></script>
<script src="https://cdn.jsdelivr.net/npm/froala-editor@latest/js/froala_editor.pkgd.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/froala-editor@latest/css/froala_editor.pkgd.min.css">
<div id="froala-editor">
<ul><li>Copy text from MS Word<br></li><li>Open the browser console<br></li><li>Paste the text into the editor</li><li>Watch console messages <br></li></ul>
</div>
JavaScript
new FroalaEditor('div#froala-editor',{
documentReady: true,
//pastePlain: true,
wordPasteModal : false,
wordPasteKeepFormatting: true,
wordDeniedTags: ['a'],
wordDeniedAttrs: ['id'],
// pasteDeniedAttrs: ['class', 'style'],
events: {
'paste.beforeCleanup': function (clipboard_html) {
// Do something here.
// this is the editor instance.
console.log('beforeCleanup');
console.log(clipboard_html);
},
'paste.afterCleanup': function (clipboard_html) {
// Do something here.
// this is the editor instance.
console.log('afterCleanup');
console.log(clipboard_html);
},
'paste.before': function (original_event) {
// Do something here.
// this is the editor instance.
console.log('before');
console.log(original_event);
},
'paste.after': function () {
// Do something here.
// this is the editor instance.
console.log('after');
}
},
});
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Fiddle Pages
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Get Fiddle Pages with PRO
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.