[Webkit-unassigned] [Bug 247661] New: Web Inspector: Elements Copy HTML with a prettified option

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 8 22:11:44 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=247661

            Bug ID: 247661
           Summary: Web Inspector: Elements Copy HTML with a prettified
                    option
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Inspector
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: karlcow at apple.com
                CC: inspector-bugzilla-changes at group.apple.com

Created attachment 463463

  --> https://bugs.webkit.org/attachment.cgi?id=463463&action=review

copy HTML feature

1. Go to apple.com
2. Open Web Inspector
3. Select a node in Elements Tab
4. Ctrl + Click on the chosen node
5. A contextual menu opens
6. Choose Copy HTML

Expected:
Have an option to Copy Prettified HTML

Actual:
The HTML is a big chunk of packed text

This for example:

```
<div class="cta-links">
                                                                                                        <a class="icon icon-after icon-chevronright" href="/ipad-10.9/" target="_self" rel="follow" data-analytics-region="learn more" data-analytics-title="Learn more about iPad" aria-label="Learn more about iPad">Learn more</a>
                                                                                                        <a class="icon icon-after icon-chevronright" href="/us/shop/goto/buy_ipad/ipad" target="_self" rel="follow" data-analytics-region="buy" data-analytics-title="Buy iPad" aria-label="Buy iPad">Buy</a>
                                                                                </div>
```


In some cases when sharing code, this form (or any form that the prettifier chooses) can be clearer to explain the code (here prettified through VSCode):

```
<div class="cta-links">
  <a
    class="icon icon-after icon-chevronright"
    href="/ipad-10.9/"
    target="_self"
    rel="follow"
    data-analytics-region="learn more"
    data-analytics-title="Learn more about iPad"
    aria-label="Learn more about iPad"
    >Learn more</a
  >
  <a
    class="icon icon-after icon-chevronright"
    href="/us/shop/goto/buy_ipad/ipad"
    target="_self"
    rel="follow"
    data-analytics-region="buy"
    data-analytics-title="Buy iPad"
    aria-label="Buy iPad"
    >Buy</a
  >
</div>
```

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20221109/0508e67a/attachment.htm>


More information about the webkit-unassigned mailing list