Jump to content

Archived

This topic is now archived and is closed to further replies.

Audun MB

[Solved] Lots of ugly formatting with copy/paste in and into sections

Recommended Posts

Audun MB

When you paste text into sections there's a ton of code that gets added (CSS styles and spans for every line it seems). It's easy to work around, but whenever I forget to use my clipboard managers "Paste plain text" functionality or toggle off rich text before pasting, I have to do a lot of cleanup. As the code you get when you toggle off rich text continue includes a lot more than the actual text you want to edit, it's easy to do something wrong. 

Could you make this easier in some way, like forcing text to be pasted as plain text in sections? Or at least hide all the extra code that's not relevant to the text in plain text view.

 

Share this post


Link to post
Share on other sites
Audun MB

Btw what is this anyway (stuff after the actual text in sections):

<div class="ugdv_contextMenu" id="ugdv_myMenu" style="display: none;"><ul id="ugdv_contextMenu"><li id="ugdv_menuItem_google_docs">Open in Google Docs Viewer<br></li><li id="ugdv_menuItem_new_tab">Open link in new tab<br></li><li id="ugdv_menuItem_new_window">Open link in new window<br></li><li id="ugdv_menuItem_new_incognito">Open link in new incognito window<br></li><li class="ugdv_seperator"><br></li><li id="ugdv_menuItem_download_file">Download file<br></li><li id="ugdv_menuItem_copy">Copy link address<br></li><li id="ugdv_menuItem_editpdf">Edit PDF File on PDFescape.com<br></li><li id="ugdv_menuItem_google_docs">Open in Google Docs Viewer</li><li id="ugdv_menuItem_new_tab">Open link in new tab</li><li id="ugdv_menuItem_new_window">Open link in new window</li><li id="ugdv_menuItem_new_incognito">Open link in new incognito window</li><li class="ugdv_seperator"></li><li id="ugdv_menuItem_download_file">Download file</li><li id="ugdv_menuItem_copy">Copy link address</li><li id="ugdv_menuItem_editpdf">Edit PDF File on PDFescape.com</li></ul></div><div id="ugdv_jqContextMenu" style="display: none; position: absolute; z-index: 9999;"><br></div><div style="background-color: rgb(0, 0, 0); position: absolute; opacity: 0.2; z-index: 9998; display: none;"><br></div><div class="ugdv_contextMenu" id="ugdv_myMenu" style="display: none;"><ul id="ugdv_contextMenu"></ul></div><div id="ugdv_jqContextMenu" style="display: none; position: absolute; z-index: 9999;"></div><div style="background-color: rgb(0, 0, 0); position: absolute; opacity: 0.2; z-index: 9998; display: none;"></div>

 

Share this post


Link to post
Share on other sites
Andrew

we dont want to make too many decisions for people and we maintain the standards of WP where possible. 

I think you're seeing the autoformat functionality from WP... I'd have to see a live link to know more.

The HTML from your second post is unrelated to PL 

Share this post


Link to post
Share on other sites
Audun MB
18 hours ago, Andrew said:

we dont want to make too many decisions for people and we maintain the standards of WP where possible. 

I think you're seeing the autoformat functionality from WP... I'd have to see a live link to know more.

Ok. I didn't know that there was an autoformat functionality outside of the TinyMCE editor (which doesn't do these things). Any way to turn it off? 

Seems like it does a lot of weird things like adding divs for each line break, replacing strong-tags with b-tags and em-tags with i-tags.

18 hours ago, Andrew said:

The HTML from your second post is unrelated to PL 

Good to know that the HTML is unrelated to PL, I guess there is some plugin adding it, but I can't figure out what. It reappears magically if delete it. 

 

 

Share this post


Link to post
Share on other sites
Audun MB

Are you sure that this is default WP behaviour? Widgets doesn't do this? I expect a Text section and a Text widget to act in the same way, but Text widgets doesn't edit the code.

Share this post


Link to post
Share on other sites

×