Skip to content

do not copy ui junk to clipboard #1221

@gordonwoodhull

Description

@gordonwoodhull

currently if you select multiple cells and copy them, you'll get the cell commands and part number as well.

it's possible to refine the selection with

    $('body').on('copy', function() {
        var sel = window.getSelection();
       ...
    });

and there are examples of how to add copyright stuff to what's copied

https://www.jitbit.com/alexblog/230-javascript-injecting-extra-info-to-copy-pasted-text/

since Chrome doesn't support Selection.removeRange (and I'm not sure if it is supposed to break the selection into multiple ranges), what we probably need to do is iterate over the cells which are touched by the selection and either add just the content parts to a new selection, or (shudder) create an invisible div, as the folks above are doing.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions