GetmeUK / ContentTools

A JS library for building WYSIWYG editors for HTML content.
http://getcontenttools.com
MIT License
3.95k stars 395 forks source link

Can't copy & paste in 1.6.0 #458

Closed lubomirblazekcz closed 6 years ago

lubomirblazekcz commented 6 years ago

When copy paste from text editor I get this error:

TypeError: p is undefined
[Zjistit více]
content-tools.min.js:6:21951
f</c.prototype.pasteText
http://offers.devlogic.cz/build/content-tools.min.js:6:21951
f</c.prototype.init/this._handleClipboardPaste</<
http://offers.devlogic.cz/build/content-tools.min.js:6:17918
a.Node</b.prototype.trigger
http://offers.devlogic.cz/build/content-tools.min.js:2:26224
a.Element</c.prototype._onPaste
http://offers.devlogic.cz/build/content-tools.min.js:3:4256
a.Element</c.prototype._addDOMEventListeners/this._domEventHandlers.paste</<
http://offers.devlogic.cz/build/content-tools.min.js:3:3155
anthonyjb commented 6 years ago

Hi @evromalarkey thanks for the report please can you provide a sample of the text your pasting that allows me to reproduce the error. In the mean time if you're in a hurry to deploy then since I suspect this error is down to the recent update to support C&P of HTML I suggest going back a release.

lubomirblazekcz commented 6 years ago

It was simple random text from windows notepad. I suspected it was due the recent update, I've reverted back.

anthonyjb commented 6 years ago

@evromalarkey 1.6.1 release should resolve the issue for you.

antonkomarev commented 6 years ago

Still not working for me in 1.6.1 :(

anthonyjb commented 6 years ago

@a-komarev please provide reproducable steps or an example and I'll reopen and look to resolve ASAP.

antonkomarev commented 6 years ago

It doesn't paste text to fixture region

anthonyjb commented 6 years ago

@a-komarev are you pasting multiple paragraphs? I don't think this will be currently supported - I guess if you paste into a region it always needs to convert the content to a single HTML string (e.g no block level tags).

I'll open a new issue specific for fixtures and resolve this over the weekend - thanks for flagging @a-komarev :+1:

antonkomarev commented 6 years ago

I've made new issue for you with steps to reproduce.