BrendonKoz Posted 12 hours ago Posted 12 hours ago Has anyone else experienced an issue when pasting simple Excel data into TinyMCE where cells that are empty are dropping the entire cell from the markup? 1 2 3 1 3 1 2 3 2 3 The above simple test copied from Excel, and pasted into a TinyMCE field (in my site) seems to be dropping any empty cells, where everything is shifted to the left. I am thinking that if not everyone is experiencing this, that it's my TinyMCE plugin's Pastefilter configuration, but looking at it, I can't really see a reason as to why this would be happening. I could see HTMLPurifier causing this, but it happens immediately upon paste (and testing in Word, or here, as shown above, the cells are not lost/dropped). NOTE: Pasting the content that was created in the forum, above, worked just fine in TinyMCE, so the trouble appears to specifically be the combination of coming from Excel and my Pastefilter configuration. (In the photo, the top is the pasted Excel, the bottom is re-copied from the pasted table above, via InvisionForum.) My Pastefilter string: p, strong, em, hr, br, u, s, ul, ol, li, a[href|id], table, thead, tbody, tfoot, tr, tr[rowspan], td, td[colspan], th, th[colspan], colgroup, col, sup, sub, figure, figcaption, pre, b=strong, i=em I'm currently running ProcessWire v3.0.257, and Mozilla Firefox.
BrendonKoz Posted 11 hours ago Author Posted 11 hours ago Found the Mozilla Developer Network (MDN) had an example raw clipboard reader, so I could see what was available to be pasted from the clipboard prior to Pastefilter running. (I can't copy the textual content, so unfortunately it's an image.) This does show that it's an empty `<TD></TD>` that gets cleared from the richtext (html/text) portion of the clipboard content.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now