Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

BUG: Copy Paste

Community Beginner ,
Mar 08, 2022 Mar 08, 2022

When I copy and paste in Dreamweaver 21.2 the pasted code is not displayed correctly with a left shift of the characters.  When I edit to correct, save and then review the information is incorrect because I was editing something different to what was pasted because it wasn't displaying correctly.

 

Things get worse when I undo, with wierd stuff displaying.  Very hard to use the code editor when these behaviours are witnessed.

TOPICS
Code , Other
862
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 08, 2022 Mar 08, 2022

I am assuming that you have some HTML code that you have copied from an example and you have pasted the code into Code View in Dreamweaver. Are you saying that the first characters are removed causing the other characters to shift left?

 

Showing the code that you want to paste would help use to understand.

 

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 08, 2022 Mar 08, 2022

Which DW version?

Which operating system?

It sounds like your clipboard contents are corrupted.  Have you restarted your computer lately?

 

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 08, 2022 Mar 08, 2022

Also it's not a BUG unless other users can reproduce it.

 

Which app are you copying & pasting from?

Are you pasting content directly into CODE view, DESIGN view or LIVE view panel?

 

When copying formatted content from MS Office, it's best to Use Edit > Paste Special > Text only or Text with structure.  This ensures no unwanted junk code gets into your HTML document.

 

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 08, 2022 Mar 08, 2022

Hi - What do you mean by a 'left shift' ? Send a screenshot example if you can.

 

Do you have extensions installed?

Paul-M - Community Expert
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 09, 2022 Mar 09, 2022

OK, so this is a new install on Macos Monterey.

 

Here is some sample text used in the following screenshots:

 

Dez also had his own gallery from 2011 to 2017 as artist in residence at Houghtons
Which was very popular with the tourists and locals alike

 

So in Developer layout / Code view

 

Code before pasting:

RoxA7_0-1646814259038.png

 

Code after going to the end of the </p> clicking enter and pasting the text above:

RoxA7_1-1646814375446.png

If you look at line 51 there is no "w"

If I go to the start of the line and put a "w" in and then save, close and reopen this is what I get:

RoxA7_2-1646814563936.png

The copied text is from Outlook but it has been put into a text editor and copied as text also and the same problem happens.

The same problem happens with Edit | Paste Special | Text Only

Pretty certain that is a bug.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 09, 2022 Mar 09, 2022

BenPleysier_0-1646822880272.png

That is not code, it is just text. For it to be code, it needs to be encapsulated within 'p' (paragraph) tags.

 

Please take a course in HTML See https://www.w3schools.com/html/

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 15, 2022 Mar 15, 2022

Thanks Ben but I am just pasting as a sample.  I don't need help with HTML, I need help with fixing Dreamweavers strange pasting behaviour.  

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 15, 2022 Mar 15, 2022
quote

Thanks Ben but I am just pasting as a sample.  I don't need help with HTML, I need help with fixing Dreamweavers strange pasting behaviour.  


By @RoxA7

 

I am sorry, but to me it seemed that you are pasting raw text into code view. If you do the same when in design view, does it not add the appropriate tags?

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 15, 2022 Mar 15, 2022

@RoxA7,

I posted an animated screen capture below that shows how to paste copied text into Design view.  Did you review it?

 

 

 

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 09, 2022 Mar 09, 2022

You're inserting text into nothing?  No opening and closing <p> tags?

 

Suggest you create a dummy text placeholder for content.

Type p>lorem and hit Enter. 

Emmet will do the rest.

 

Replace  "Lorem ipsum dolor..." content inside <p> </p> tags with your plain text.

 

Hope that helps.

 

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 15, 2022 Mar 15, 2022

Nancy, I am just pasting text, not trying to create good code.  Look at the source text and what appeared.

 

Do you and Ben only expect Dreamweavers paste to work if the pasted text is valid code.  I thought I could paste text!  All my other text editors can handle text being pasted and then parsing it.  Anyway, you were quite rude about not being a bug, I showed it was a bug and you have gone off on another tangent.  Not helpful and the bug still exists.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 15, 2022 Mar 15, 2022

Do you have any extensions installed? Are you using GIT?

Paul-M - Community Expert
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 15, 2022 Mar 15, 2022

As stated this is a fresh install.  GIT is part of Dreamweaver but is not being used with this file.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 15, 2022 Mar 15, 2022

I would see if it's possibly a font issue with Source Code Pro.

Other Mac users are having issues in Code View because of a conflict with Source Code Pro, maybe a lesser version of that issue is forcing DW to display pasted content missing that first character?

(weirder things have happened)

1. Go to Edit > Preferences > Fonts
2. Choose some other font, like Arial, for the Code View field
3. Hit Apply
4. Test the copy/paste again and see if anything is getting cut off

 

While I don't agree that you should need to paste valid code snippets into DW, the end result of a paste should still be valid. DW goes batty on invalid code, forcing more than a few features to stop working when it encounters a violation. For giggles, put a set of <p> </p> tags in there first, then paste between them and see if DW still cuts it off. At least it will help narrow it down a bit, if things work differently.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 15, 2022 Mar 15, 2022

DW is not a plain TEXT editor though.  It's web authoring software.  And the language of the web is valid code  -- HTML, CSS and JavaScript.

 

Starting with a valid document and structure, I can paste text into DESIGN View, no problem.  Watch this screen capture.  For this example, pasted text was copied from my web browser with Ctrl + C.

 

DW-PasteSpecial2-anim.gif

 

Hope that helps.

 

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 20, 2022 Mar 20, 2022

OK, since it is only a bug if valid HTML is pasted (I thought I was talking about a problem with Dreamweaver functionality rather than asking for a critique of my coding skills) here is a screen shot of the following text pasted into an empty HTML file:

Text copied:

 

<!DOCTYPE html>
<html>
<title>HTML Tutorial</title>
<body>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>

 

Result when pasted into dreamweaver:

 

RoxA7_0-1647762662618.png

 

As you can see the open "<" on the html, body and paragragh tags on lines 2,3,4,6,8 failed to paste correctly or appear to paste correctly.  Interestingly the Heading 1 tag does!

 

Further, if I go back and add the open "<"s so the code in dreamweaver looks like this:

RoxA7_3-1647763022152.png

 

And then close the file and reopen this is what has appeared:

RoxA7_4-1647763061591.png

Now there is probably some poor coding in my original HTML but I copied from w3schools and it looks well formed to me but this is certainly looking like a bug, if nothing else in what is displayed on the screen.

I expect more flames or discussion about things unrelated to the problem I am trying to highlight but if anyone at Adobe is interested it would be good to fix this which makes coding difficult (code doesn't display correctly when pasted).

 

For your information Nancy, I have been using Dreamweaver since it was a Macromedia product (and Homesite before that) so don't need a tutorial on copying from the web and pasting into Dreamweaver.  I need an application that works.

 

 

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 20, 2022 Mar 20, 2022
LATEST

Did you change Fonts as Jon suggested 5 days ago?  Corrupted fonts have been known to cause issues.

 

image.png

 

When all else fails, use the nuclear option.  Wipe DW and Creative Cloud desktopp app off your system with Adobe Cleaner Tool. 

https://helpx.adobe.com/creative-cloud/kb/cc-cleaner-tool-installation-problems.html

Restart computer. 

Start over with a fresh installation of CC and DW.

 

 

 

 

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines