Paste Excel Table into TinyMCE while Keeping Format

10,116

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);
   }
Share:
10,116
Kamil Sindi
Author by

Kamil Sindi

Updated on June 05, 2022

Comments

  • Kamil Sindi
    Kamil Sindi almost 2 years

    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.

  • Kamil Sindi
    Kamil Sindi almost 13 years
    Thariama. Has pasting from Excel worked for you? Using the paste plugin, pasting a table from Word is fine, but I can't configure it to work for Excel.
  • Thariama
    Thariama almost 13 years
    hmm, in that case you will have to use the paste_preprocess setting to define an own function in which you have to take care of the format yourself
  • Kamil Sindi
    Kamil Sindi almost 13 years
    But won't one have to work with MS Clipboard somehow? How can my function "anticipate" the formatting from Excel and handle it?
  • Thariama
    Thariama almost 13 years
    i am not used to copy from excel, but you can use firebug to log what gets pasted into the editor - maybe there are some special markers which identify that the content came from excel
  • user3217843
    user3217843 over 9 years
    i m copying the formatted table form the word and paste it into the tinymce but i m not getting the format same as the word. tinymce losses the format.how to resolve this issue ?
  • Eranga Kapukotuwa
    Eranga Kapukotuwa over 7 years
    is anyone have a luck with excel sheets. MS word works fine. But excel is not working.