Closed eplebel closed 9 years ago
This is the browser working as designed. In order to fix this I would need to use javascript to detect a paste event, intercept the clipboard contents, strip HTML tags from it, and paste the plain text. But what if the user wants to paste text with line breaks or URL links in it?
Great points! Hence, leave the formatting issues as is for now, and just try to address the duplicate text issue. Thanks!
Wow, this one was a pain in the ass, but I finally fixed it in both Chrome and Firefox! No promises about IE, Safari or Opera though!
Deployed to staging and PR opened: https://github.com/ScienceCommons/www/pull/47
Wow, you're a work horse!! That's awesome. I guess now we now why that freelancer gave up on that job!
Thanks so much!
STEPS:
Notice that the formatting from the website is displayed in these textboxes, instead of being stripped away (as is the case for the main search box or comment text boxes). This is happening on both staging and production. NOTE: Once an article is added or saved, the formatting is stripped away and it displays correctly.
A closely related issue is that copy-and-pasting into the abstract text box (either on add article screen or edit mode) on STAGING results in the text being duplicated (once with formatting stripped away and another time with the original formatting). This does NOT occur on production, and is probably related to @manzhikov last changes (see https://github.com/ScienceCommons/www/commit/2cd3da25049ab53efd2ffa30b573b1cc7070962b ) in relation to issue #175