Extraneous tags using Copy/Paste

N.B.: CTRL/SHIFT/V (i.e., "Paste as plain text") is a workaround but not a solution!

I've experienced other occasions where unwanted <br/>s have appeared but don't recall the sequence of events other than that Copy/Paste was involved. I think it was while trying to paste into a <label> but I'm not sure. But here's a repeatable sequence to make the error appear.



Big mess using CTRL/V -- those extra breaks sure can mess up a lovingly handcrafted form

Select "AAA" ... CTRL/C ... select "ZZZ" ... CTRL/V


But if you use CTRL/SHIFT/V, you get the expected results ...

select "AAA" ... CTRL/C ... select "ZZZ" ... CTRL/SHIFT/V


I have to reiterate the same as the other post you were reading on this same issue. It's most likely caused by the resource you are copying it from, it is definitely not BSS. I have copied and pasted in BSS for years and the only time I get this issue is if I copy it from a source like Email, Word Doc, Various PDF files, and so on. You need to copy it from the source to a raw text editor and then to BSS if it's coming from anything that might have formatting in it.

I use Textmate on my Mac, and Notepad++ used to be my goto text app on Windows, not sure if it is still that way or not, but try it and see. Any raw text editor that will strip formatting.

The other thing that causes this is when it's copied from PDF's and website etc. Many times the person that did the site was not too good at knowing how to put paragraphs in so they created multiple lines to handle each line of the paragraph. You may not see that on the page when looking at it, but when you copy the text it's also copying the line breaks that go with it as well.

@jo ... I agree ... it's the source that's at the root of the problem. But there's a bug in BSS's Copy and not BSS's Paste.

In my example above, I thought I had only highlighted the three characters ("AAA") and didn't/don't expect that to include any formatting ... particularly formatting I didn't introduce but rather was added to those 3 simple characters by BSS. Apparently the editor got all excited when I double clicked the "AAA" and included his control characters before and after my source then turned them into <br />s when I pasted them into the second <span> . Those control characters belong to the BSS editor and not to me. They are there to control the editor and are not part of the user's data. Thus, they should be stripped as part of the Copy before the user has a chance to shoot themselves in the foot.

It isn't apparent to the user whether the copied data is "plain text" or contains formatting. And that's where using CTRL/SHIFT/V workaround comes into play. Use CTRL/V and if it makes a mess on the rug, then UNDO and try again with CTRL/SHIFT/V.

Whoops -- With a bit more nosing around, I just discovered that CTR/SHIFT/V has an equally little known brother -- CTRL/SHIFT/C. Using that, I will avoid any new surprises -- without having to use my old friend Notepad++. And you may be able to avoid passing through an external text editor to canonicalize your data.

Bottom line -- folks can use CTRL/SHIFT/C and CTRL/SHIFT/V (or CTRL/V if they wish to preserve control characters) as editing techniques when copying data from sources outside BSS. But the BSS editor should not copy anything that is originated by BSS itself and is not visible to the user.

@jo said "I use Textmate on my Mac, and Notepad++ used to be my goto text app on Windows, not sure if it is still that way or not, but try it and see. Any raw text editor that will strip formatting."

tested now with notepad++ and atom.io no issue whatever. It's plain wrong to paste text from a word processor unless you expect BSS to accept and use bolds, underlines, paragraphs, and most formatting.

My mistake @TonyBenedetti for not reading closer to see you were talking about copies within the app.

Let me also add that if you copy things by double clicking to highlight all the text, it does tend to grab extra formatting from BSS. I've found that if I manually highlight I do not have that issue. I don't know if this is a bug or not, but I would expect we "should" be able to copy text from within the app without pulling formatting and extra line breaks etc.

I will reiterate what was told to me a not too long ago when I complained about the pasting of text from anywhere (including within BSS) where there was no formatting on the text at all, and where it "should" be retaining the formatting of the text in the location you are pasting it to (in other words, you're editing text that was already there and already bold and a specific color and when you paste new text to replace it, it wouldn't retain the formatting).

Use CSS and not the internal text editor if you think that text will be updated often or periodically. That way no matter what you paste there, it will retain the formatting it should have always (still keeping in mind not to paste from Rich Text Editor type apps). That at least will alleviate any issues you have with formatting. It DOESN'T fix the issue with the line break though so that should be looked into.

One thing I did forget though:

If you have added a shift+enter at the end of a text line (maybe that's what you may have done to create a new line in a paragraph?) I believe using the double click to copy text, definitely will pick up that line break. Check your code (since you can't see it in the visual preview) and see if there's a line break in there at all.

P.S. And thanks for the tip on the Crtl+Shift+V/C that will help a lot if I can remember to use it after being in copy/paste directly mode for so long lol.

We did some updates to pasting in Bootstrap Studio 4.5.4. We now have a "Paste From Word" option in the Edit menu. It attempts to clean up common extraneous markup that some rich editors like Word, Open Office etc add.

Can’t wait to check this out. It has been an issue for so many WebDesign apps for so many years it would be awesome to have this worked out in BSS.

So, I have finally gotten some time to open my new PC laptop and check out the new updates! Haven't gotten far yet, but came across this issue almost immediately ...

So ... one thing that means is that it is PC based as I don't/didn't have this issue at all on my Mac before I left home for a month or so. Not sure if that helps or not, but at least you can be sure it's PC only issue and it's definitely an issue.

Whenever copying from any source, I always paste into a raw text editor first. It just saves headaches down the road.

I do the same thing... copy from BSS into Notepad, and then copy from Notepad into BSS to get rid of the extra added characters from BSS during the copy/cut.

I agree but the point here is that you should not have to do that when you copy from BSS itself. So Iam pretty sure this fits the bug category.