Is there a TinyMCE plugin that allows to paste a table from MS Excel while also keeping the format of that table?
Partial solution: So using the paste plugin, you can paste the Excel table onto Word and then from Word paste it onto TinyMCE, which formats correctly. This is not ideal but better than nothing. Still hoping someone has a better solution.
TinyMCE has built-in paste functionality, however PowerPaste is a premium plugin that provides improved paste support, including support for Microsoft Word, Microsoft Excel and Google Docs content. It also includes the option to clean or merge the styles when pasting content into the editor. For information, see the PowerPaste plugin.
Just like the earlier one. You may choose the Paste Special option. Then choose either Paste or Keep Source Formatting or Keep Source Column Width option. You will find everything including the formats pasted beautifully.
Choosing Paste Option by Right Clicking the Desired Cell If you do not want to follow the previous procedure, you can follow this procedure and paste without changing the format. Step 1: Select the first cell where you want to paste the database. This may be in the same worksheet or another worksheet.
Step-01: In this method, you have to select the formatted row at first and then press CTRL + C. In this way, the formatted row will be copied. Step-02: After that right-click on your mouse and click on Paste Special option and then the Formatting option. Step-03: After that, the following formatted table will appear.
You might want to check out the paste plugin. This plugin needs to be configured properly. have a look here for the documentation.
EDIT: Example to log the pasted content:
paste_preprocess : function(pl, o) {
console.log('Object', o);
console.log('Content:', o.content);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With