News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Using WYSIWYG to Copy Paste Formatting into Posts - Is it Possible?

Started by Vince S, September 27, 2011, 09:14:50 PM

Previous topic - Next topic

Vince S

G'day, This feels like a dumb question to me but I can't figure it out or find the answer here. If I or others simply want to copy relevant info (typically announcements) from other sources and put it up in a post I can't find an easy way to do that. As in paste the info complete with different fonts, alignment, bold, hyperlinks, email addresses, superscripts / subscripts etc.

Sure the WYSIWYG editor allows the pasted text to be modified manually, which I have done a lot of, but it doesn't take it "as copied" for pasting. Converting to UTF-8 a while back allowed at least bullet points and inverted commas and the like to go in OK, which was very useful, but so far pasting formatting eludes me.

If I, as administrator, use the  stuff  to post and get the "stuff' from viewing the source in the relevant email that is better, but still a fairly botched effort. A whole pile of inconsistencies in html arise and it is awkward and slow to fix html "errors" arising since typically so much "bumf" html also arrives, in a typical Outlook email anyway.

Can anyone put me out of my misery here please? Or does it turn out I am asking for a new feature? Thank you.
Try figuring out where all this is going to keep coming from: Millionaire Baby? Or just pass me a beer and we'll sort it, thank you.....

Vince S

I am guessing the lack of response means WYSIWYG pasting is not currently possible. Could a moderator please move this topic to New Features request. Thank you.

For anyone else reading this because they want the feature too if you are the admin you can use html to post, which at least makes it possible to put up emailed info as it appears. I typically write a short intro to the info then do this:

Open the original email in Microsoft Outlook (I have 2007). Right click and select "View Source" which opens a separate window with the html. Find <body> and </body> and highlight all the text between them and copy it. Go to your new post and put  paste the stuff you copied  and then any summary you may care to write. If you want the pasted info to be a different colour you can use the SMF editor to do this by selecting all the text PLUS the html tags and change colour in the normal way.

The problem with the above procedure is that it is farking difficult to edit the html you paste in as there is so much of it and changing or deleting anything is a pain as you have to find it amongst the code dross in the first place and then change it in a way that includes all the relevant html tags being open and closed properly - not too bad with practice but definitely a hassle! Much better if there was an SMF feature that permitted this basic task to be done smoothly.
Try figuring out where all this is going to keep coming from: Millionaire Baby? Or just pass me a beer and we'll sort it, thank you.....

Sea Mac

Quote from: Vince S on October 13, 2011, 03:23:58 PM
I am guessing the lack of response means WYSIWYG pasting is not currently possible. Could a moderator please move this topic to New Features request. Thank you.

For anyone else reading this because they want the feature too if you are the admin you can use html to post, which at least makes it possible to put up emailed info as it appears. I typically write a short intro to the info then do this:

Open the original email in Microsoft Outlook (I have 2007). Right click and select "View Source" which opens a separate window with the html. Find <body> and </body> and highlight all the text between them and copy it. Go to your new post and put  paste the stuff you copied  and then any summary you may care to write. If you want the pasted info to be a different colour you can use the SMF editor to do this by selecting all the text PLUS the html tags and change colour in the normal way.

The problem with the above procedure is that it is farking difficult to edit the html you paste in as there is so much of it and changing or deleting anything is a pain as you have to find it amongst the code dross in the first place and then change it in a way that includes all the relevant html tags being open and closed properly - not too bad with practice but definitely a hassle! Much better if there was an SMF feature that permitted this basic task to be done smoothly.
Switch to the Plain text editor first.

Use the [ html ] BBC tag set as the FIRST and LAST BBC tags: manually type them in if you must.

Then paste in the HTML Tags that fall between body and /body in your email's source.

(look up the HTML BBC Tag set in the Alphabetical list of all bulletin board codes on the links below ... )  See Also
The HTML BBC tag set has been a lifesaver ... I can even paste in Javascripts, too! And it totally SOLVES your need to reformat anything!

Deaks

~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Kindred

And with incorrect information... You really should not be using the html tag at all... Especially not to put java scripts into posts.  Just bad process....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Steve

Quote from: Kindred on October 14, 2014, 11:39:11 PMYou really should not busing the html tag at all...

Is that supposed to say 'you should not be using the html tag at all'? If so, why not and why is it there?
DO NOT pm me for support!

Kindred

yes, stupid auto-correct-typo...
fixed.


it is there because it CAN be used... and has been used occasionally...   however, there are - without a doubt - almost always better ways to do whatever you think needs to go into the HTML BBC... (or perhaps it should not be done in the first place)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Steve

I do a lot of news reports on my forum and I often want to embed the video from the original article (they give you the code so I assume it's legal to do that). I don't know of any other easy way to do it.
DO NOT pm me for support!

Kindred

I did say "almost always..."

however, you could use one of the video embed mods

not sure I understand the point of reporting exact content from other sites though...   a blurb and a link to the other site - sure... but reporting the entire news article?  doesn't make sense to me...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sea Mac

I Used to have the problem of having to reformat my HTML sources to BBC code, for my articles ... until I recently discovered the HTML tag.

I think that tag saves a LOT of work - and I don't even know WHEN (which version) the HTML tag was introduced - nor whom to thank for it.

To the developer with INSIGHT as to actual users needs: Thank you for the HTML BBC tags! I don't use them every day .... or even every month, sometimes ... but they have proved a LOT more useful than some of the other tags! (embed flash and teletype ... I'm looking your way.)

WHY post?  I was researching a LONG Standing (> decade) problem with that crappy WYSIWYG editor - and pasting in quotes from other sites: all the extra BBC closing tags strewn throughout are a nightmare. I saw HE has a problem I've had before and I had solved - and that solution IS valid for the example he complained about - and the correct answer to his problem wasn't discussed before this. People searching for the answer to a real problem couldn't find any answer - so I added it.

You Object? Just because he was ignored, and went away disappointed last year without the answer he needed, doesn't mean that I think that anyone ELSE needs to go away thinking there is no answer to this problem THIS Year!! I didn't SEE his post last year and THAT is why I bumped an "old topic". Or do you prefer to have nothing but unanswered questions in your forum - because the questions are too old - even though they are still valid, and still bother people daily?

I finally added the SCEditor4SMF MOD to the forum - and IT does not honor the unchecked 'Show WYSIWYG Editor by default' setting in my profile!  It's WYSIWYG whether I like it or Not!!! So MAYBE SMF 2.1 will be nice with pasted quotes - or maybe we'll have that problem for 2 decades.

But his "Pasting HTML Quotes" problem does have an answer - and it appeared you all were trying to keep it a secret!!!!

Still think this VALID question was "too old" to answer? Why do you shoot at the members who are trying to be helpful? If I'm not a member of your clique my answers aren't welcome, is that it?

Put yourself in my shoes: do you think I'm going to be MORE, or LESS, likely to try to be helpful when I see an unanswered support request that is "too old" NEXT Time (IF I even ever bother to try to help again, some year ... )?

Go on: Drive off all the new users who try to help - just keep the Trolls who criticize only - that's the way to build a better forum about a better forum! Do it with NO feedback from administrators, of forums that use your software: to make it as useful as possible to them, OK?


Sorry I TRIED to be helpful.  >:(

Kindred

I am quite confused as to what that rant was about... We were not trying to HIDE anything. Nor did I state that he couldn't do what he was asking... I merely stated that I feel that there are almost always better choices than to use the HTML BBC tags.

and - the most important thing that I was trying to communicate is that you should NOT be including javascripts in posts.

(and BTW: HTML BBC has been in the code since 1.0, AFAIK)

finally... you were called on reving a 3 year old post because that is necro-threadery...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Especially since the html bbc is only valid for administrators, and can't be used by non-admins which for embedding usually sucks. And it can't be given out safely to non-admins because it can be used to hack accounts.

Vince S

Thank you for this interesting revival. I would like to politely burst a couple of bubbles here. Firstly I ABSOLUTELY appreciated that Sea Mac had a crack at putting down an answer, for all the reasons he laid out in his very respectable rant. I do exactly the same thing myself, often! If I have pushed through to an answer it is not much trouble to add it to the most easily found on Google places which popped up first as that will be the best way to help out my fellow human being. Consequently I have a lot of single post registrations around the web. So good on you SM.

Next, we are not all "flash in the pan" types. I would suggest the reverse is true. Posting gets us auto-subscribed, which is fine and we unsubscribe if the chatter goes off in an irrelevant direction, but none of us will post something like this unless we would really like to see a solution, so we stay interested and this "why revive old posts" response (which is a common reaction I must admit) only has TRUE relevancy if the software / technology has moved on and it is pointless to do so - and that situation is far rarer than the "why revive" posters would care to admit. The "rave" was the correct answer to that question!

For the purpose of a useful advancement of the core topic, some elaboration on this would be a useful contribution:
Quote from: Kindred on October 16, 2014, 01:43:45 PM
there are almost always better choices than to use the HTML BBC tags.

This answer (use html), if it was an answer, or any other, would be as useful to me today as it would have been when I first asked. I still have the issue, and I expect many others do too. I have tried various solutions and the best one is still a case-by-case thing centred around the simple fact that the WYSIWIG editor is dysfunctional (not a whinge - a fact). Most often the html tags are the best answer, but not always. Because it is simple I will always have a crack at WYSIWYG first, then hunker down and sort through the html if I have to, which is nearly all the time. Sometimes doing a plain text paste and quickly formatting that is the best answer. Sometimes doing a screen print and pasting it in as an image is the quickest way, even if I have to do a quick bit of shuffling elements of the picture made to get stuff I want in or out as the case may be. I have set the default thumbnail size on our forum to be about 75% the real size of the image - mainly as a workaround for this crap WYSIWYG editor issue, and that is a great solution too.

Unfortunately nobody did move this topic to somewhere the concept of fixing the WYSIWIG editor to work with typical pasted email content could happen. That is the real issue here, and doing it today would still be well worth doing.

The "if it was an answer" crack comes from reading my second post in this topic where I discussed this option. It doesn't work for what I might typically want it to; this is the relevant text:

Quote from: Vince S on October 13, 2011, 03:23:58 PM
...if you are the admin you can use html to post, which at least makes it possible to put up emailed info as it appears. I typically write a short intro to the info then do this:

Open the original email in Microsoft Outlook (I have 2007). Right click and select "View Source" which opens a separate window with the html. Find <body> and </body> and highlight all the text between them and copy it. Go to your new post and put  paste the stuff you copied  and then any summary you may care to write. If you want the pasted info to be a different colour you can use the SMF editor to do this by selecting all the text PLUS the html tags and change colour in the normal way.

The problem with the above procedure is that it is farking difficult to edit the html you paste in as there is so much of it and changing or deleting anything is a pain as you have to find it amongst the code dross in the first place and then change it in a way that includes all the relevant html tags being open and closed properly - not too bad with practice but definitely a hassle! Much better if there was an SMF feature that permitted this basic task to be done smoothly.

The guts of my issue with html tags is that there is often a lot of irrelevant bumf or problematic content in the email received, and using the html method it is quite hard to just get out the useful bits to put in a post.

I don't know why I thought you needed to be an admin, although Arantor confirms that. I just tried it here and it works OK. This is what is below (without the quotes): ["html] hi ["/html]

hi

To illustrate THE REAL PROBLEM I have gone and picked a simple example, one without the hordes of html bumf that is commonly found in a typical email. I "view source" (now using Outlook 2013, but this feature has been available for years prior) then, in the example attached, search for the terms "Come and paint" and "in true Ducati style". This finds text at the beginning and end of the bit I am interested in. I then select what appears to me to be the logical beginning and end of the html before and after it.

The problem THEN becomes that, if you look at the image, you can see the Facebook etc buttons and these all work, exactly as they did in the original email. If they are personalised to me and give access to my account or even a simple Unsubscribe feature, I don't want people accessing that. So it is not as simple as just pasting in the html, and it can be very tricky stripping out the bumf or personalised information, depending on how messily the source email's html was constructed.

Because the html tags appeared to work here (per above) I tried putting the attached example in here first, but it turns out I can't do it here so I have produced the attached low res screen dump which shows what happens if you paste WYSIWIG in, which looks good as input but check out the bizarre results. Then pasted the html in, which looks messy but produces a coherent post. Complete with operating hyperlinks that I don't want in there. Sure, IN THIS EXAMPLE, it might not be too hard to strip these links out, but in many it isn't.

Another aspect of this issue is that it is of even more frustration that a successfully WYSIWYG'd pasted post (they do happen) CANNOT BE EDITED!!! Well, it can - but it all gets turned into one point high text or other bizarre crap. The only way I have found to edit it successfully is to get the source back and redo the post entirely with the changes included.

EDIT: Someone Ticked this topic as Complete? I don't think so!
Try figuring out where all this is going to keep coming from: Millionaire Baby? Or just pass me a beer and we'll sort it, thank you.....

Kindred

except - the wysiywg will not be "fixed" or anything else because it is getting completely replaced in 2.1


but the short of it is ---   pasting to something which has to try and convert your pasted, formatted text into BBC ill never be "clean" because BBC does not (and can not) cover *ALL* formatting...

So, SeaMac's necrothreadery actually was pointless as his suggestion is not valid for anyone but the admin (and you already noted it)- and the"issue" that you pointed out will pretty much always BE an "issue"
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Vince S

Whilst accepting all the bits 'n pieces of this issue (but wondering what "getting completely replaced in 2.1" means, but I hope it is an improvement and am happy to be patient), for posterity and the benefit of people searching for this issue I have found there is a workaround. See http://hunterdog.org.au/DiscussionBoard/index.php?topic=963.msg2704#msg2704 for an example of it working.

What I did to get that brilliant reproduction of two emailed newsletters is to grab the middle of the email's html as described in my previous post (View source, delete chunks I thought inappropriate, copy paste) and wrapped it in html tags, which of course only an administrator can do, and posted it. Result = a mess, as described below and like the image I attached earlier, and also despite it previewing perfectly. Before posting I had selected the text and hit "Remove formatting", which it seemed to do, despite being raw .txt in the first place.

However, select Modify and remove formatting again and hey presto, byooddifull. All workarounds should be this easy......!

A small subtlety - for the first posted email I just removed the formatting from the html section, but for the second I lazily selected all the text to remove formatting from. I had to Modify and remove formatting twice before I got the result. Once I got the answer I was very disinclined to mess with it more and find why this slight subtle difference occurred - maybe next time.....

I hope this helps someone.
Try figuring out where all this is going to keep coming from: Millionaire Baby? Or just pass me a beer and we'll sort it, thank you.....

Vince S

I had added edits to my previous post but now deleted them as I finally noticed the bleeding obvious. When I added the html to subsequent posts after the first post it has stepped the topic across and made the entire posting that went before a subset of each newer post. So I've ended up with scroll bars and leaking off the page. Does anyone know the actual html that will cause this effect so I can delete it from the later posts?

I tried replacing all the width="100%" with width="80%" and replaced all align="center" with align="left" before I spotted the actual fault.

Guess that's why only Admins have access to this feature as at least we are just doing bumbling ineptness rather than competent maliciousness!

I have attached the html text for one of the sample posts if someone could kindly point to the offending item / lines. Thank you.
Try figuring out where all this is going to keep coming from: Millionaire Baby? Or just pass me a beer and we'll sort it, thank you.....

Arantor

Quotebut wondering what "getting completely replaced in 2.1" means, but I hope it is an improvement and am happy to be patient

2.1 uses SCEditor instead of the one the SMF team previously built.

Vince S

I got stubborn and answered my own q. The issue (of course) was with the html that was stuck in the email. By the process of just putting bits in until I found what broke it I finally found that I needed to delete ONE only of the statements that started <table style=" - the other 3 could stay. I experimented with single variable deletion to no avail; in the end deleting all of the following line fixed it:

<table style="background-color:#395a5e;" border="0" width="100%" cellspacing="0" cellpadding="0" id="content_LETTER.BLOCK25">

I looked around here: http://www.sceditor.com/ and am not a lot smarter. Is the html tag feature going to make it into 2.1? Although after this bs exercise I'm not sure I want it! Screenprint dumps and large size thumbnails are also a pretty reasonable solution to the underlying issue here - there is an example of that on the first post of the earlier provided link. Just need to type in the links you want to be available, or maybe only drag a little bit of the html code out to go with the image....
Try figuring out where all this is going to keep coming from: Millionaire Baby? Or just pass me a beer and we'll sort it, thank you.....

Arantor

The HTML tag is still present and likely always will be.

The WYSIWYG editor is simply one method of rationalising random HTML into bbc as best it can.

Advertisement: