AuthorTopic: Copy-Pasting web sites to DD Forum  (Read 1900 times)

Offline Palloy2

  • Administrator
  • Sous Chef
  • *****
  • Posts: 6097
    • View Profile
    • Palloy's Blog
Copy-Pasting web sites to DD Forum
« on: January 23, 2017, 06:41:21 PM »
When you copy a section of a web page, all of the HTML tags (things in < >) and all of the text are put on the clipboard. 
When you paste from the clipboard into a Text Box (like a Forum New Topic box or Reply box)  the HTML tags are stripped out, and only the text goes in.  So images and hyperlinks and text formatting are lost. 
You can then use bbcodes to put the images and links back in, but it can be a lot of work.

To preserve the HTML tags, the clipboard has to be pasted into an HTML box, where it will look like the original web page.
You can then tidy it up, if necessary, and then view the corresponding bbcode.
Now if you copy that, you can paste it into a New Topic box and all the images and hyperlinks will be there.

You will find an HTML box at
https://www.doomsteaddiner.net/palloy/sceditor/htmlbox.htm
(You might want to Bookmark this page).

It might save you quite a bit of time on some web articles.
« Last Edit: January 23, 2017, 08:43:59 PM by Palloy2 »
"The State is a body of armed men."

Offline RE

  • Administrator
  • Chief Cook & Bottlewasher
  • *****
  • Posts: 34835
    • View Profile
Re: Copy-Pasting web sites to DD Forum
« Reply #1 on: January 23, 2017, 06:50:31 PM »
When you copy a section of a web page, all of the HTML tags (things in < >) and all of the text are put on the clipboard. 
When you paste from the clipboard into a Text Box (like a Forum New Topic box or Reply box)  the HTML tags are stripped out, and only the text goes in.  So images and hyperlinks and text formatting are lost. 
You can then use bbcodes to put the images and links back in, but it can be a lot of work.

To preserve the HTML tags, the clipboard has to be pasted into an HTML box, where it will look like the original web page.
You can then tidy it up, if necessary, and then view the corresponding bbcode.
Now if you copy that, you can paste it into a New Topic box and all the images and hyperlinks will be there.

You will find an HTML box at https://www.doomsteaddiner.net/palloy/sceditor/htmlbox.htm
It might save you quite a bit of time on some web articles.

A word of warning on using the method.

If the html is long and has a lot of scripts embeded in it, it can play havoc with the SMF page that the post is dropped on.

Be careful if/when you use this method.

I only use it when a particular article has many pictures and/or vids I want to appear directly in the forum post, and to do all of them individually is too time consuming and tedious.  If it is just a couple of pics, I do it all with standard BBcode embedding.

RE
SAVE AS MANY AS YOU CAN

Offline Palloy2

  • Administrator
  • Sous Chef
  • *****
  • Posts: 6097
    • View Profile
    • Palloy's Blog
Re: Copy-Pasting web sites to DD Forum
« Reply #2 on: January 23, 2017, 08:48:29 PM »
Yes, it has to look right in the HTML Box and in the forum's Text Box - don't just assume it will be.
"The State is a body of armed men."

Offline RE

  • Administrator
  • Chief Cook & Bottlewasher
  • *****
  • Posts: 34835
    • View Profile
Re: Copy-Pasting web sites to DD Forum
« Reply #3 on: January 24, 2017, 01:13:06 AM »
Yes, it has to look right in the HTML Box and in the forum's Text Box - don't just assume it will be.

Even when it looks right in preview, it can still mess up the page.

RE
SAVE AS MANY AS YOU CAN

Offline Palloy2

  • Administrator
  • Sous Chef
  • *****
  • Posts: 6097
    • View Profile
    • Palloy's Blog
Re: Copy-Pasting web sites to DD Forum
« Reply #4 on: January 25, 2017, 07:00:38 PM »
I don't know how that could happen - <script> in the body of the page has no bbcode translation so should be omitted. The page may not work correctly when buttons are pushed.  Do you know what causes it?
"The State is a body of armed men."

Offline RE

  • Administrator
  • Chief Cook & Bottlewasher
  • *****
  • Posts: 34835
    • View Profile
Re: Copy-Pasting web sites to DD Forum
« Reply #5 on: January 25, 2017, 07:09:02 PM »
I don't know how that could happen - <script> in the body of the page has no bbcode translation so should be omitted. The page may not work correctly when buttons are pushed.  Do you know what causes it?

I have no idea why it occurs.

The effect is that many of the posts on a given page turn "brown", not just the offending html laden post itself.

Each SMF page will house 15 posts.  Once you go to a new page, the problem disappears.  I have no idea why this occurs.

RE
SAVE AS MANY AS YOU CAN

 

Related Topics

  Subject / Started by Replies Last post
7 Replies
843 Views
Last post April 29, 2014, 03:34:41 PM
by JRM
0 Replies
389 Views
Last post May 16, 2016, 06:48:36 PM
by Palloy
0 Replies
305 Views
Last post October 27, 2016, 10:55:06 AM
by Eddie