Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copy/cut and text-transform #178

Closed
yosinch opened this issue Aug 17, 2018 · 2 comments
Closed

copy/cut and text-transform #178

yosinch opened this issue Aug 17, 2018 · 2 comments

Comments

@yosinch
Copy link

yosinch commented Aug 17, 2018

Can we standardize clipboard content of "copy" and "cut" command at least text-transform[1][2]? The discussion was happened on April 2015 in CSSWG but we don't have conclusion.

My proposal is

  • text/plan: text applied text-transform like Element#InnerText[3]
  • text/html: text is as same as Text node == no white space collapsing no text-transform.

[1] http://crbug.com/325231 text-transform should not affect clipboard text/html
[2] https://lists.w3.org/Archives/Public/www-style/2015Apr/0015.html [css-text] copying text-transform'd text
[3] https://html.spec.whatwg.org/multipage/dom.html#the-innertext-idl-attribute

@johanneswilm
Copy link
Contributor

@yosinch I am not entirely sure how to read your proposal for text/html. I am personally in favor keeping the HTML structure as it is when moving it to the clipboard - so that means not turning text into capitalized text or alike. The reason for that is that only if you do not change the structure, you keep the original data intact. How this is then ending up in the final paste location is up to the paste handling script of the receiver. Some apps may want to apply the transformation, while others may not. At times the application where the paste takes places may be able to guess where the original sources come from and then act accordingly -- but that does not work if the transformation has been applied already.

And example for that could be a site that allows copying book information from a well-known bookshop site directly into a form or inside a document. The bookshop site uses all caps titles of all books for styling purposes, but when pasting the title, the application that handles the paste wants to use the original capitalization.

@johanneswilm
Copy link
Contributor

Now being tracked in #181

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants