Open changkun opened 2 years ago
Excuse me, is there currently a plan that supports file(.pdf, .txt...) types?
We can actually start case by case. But that would be a different issue.
Cool! May I ask, when will it start?
There is no official plan for it. But things can get prioritized if we find this a high demand.
There is no official plan for it. But things can get prioritized if we find this a high demand.
I got it. Thanks a lot.
There is no official plan for it. But things can get prioritized if we find this a high demand.
I think custom formats would be awesome. Maybe also some functions to inspect the format, currently in the clipboard? For my application, I want to generate some Excel data, which should be styled. So if I could copy the data in the style I like, and then replicate the format, but change the content, that would be awesome!
I want to generate some Excel data, which should be styled. So if I could copy the data in the style I like, and then replicate the format, but change the content, that would be awesome!
This is an interesting case. Would you mind creating a different issue specifically for this type of data and elaborating a little bit more on the use case then cite to this issue?
Would you mind creating a different issue specifically for this type of data and elaborating a little bit more on the use case then cite to this issue?
I thought about creating a new issue, but I think it's a bit more complicated, as the user would have to change the format, depending on his input. Custom formats would be perfect for that.
Excel uses a combination of many formats, when copying cells. For this example, I will copy those two cells:
Those cells have bold and centered text styling.
This is the clipboard:
Click to expand
Hello | World |
As we can see here, excel uses multiple formats, to make pasting in different applications possible. The XML Spreadsheet
format, seems to be excels own. Outside of Excel, either HTML or RTF will be used to give the pasted content the styling.
I suggest that something is added to inspect those different formats, and to modify them. In my case, I want to create a tool, that helps me to fill out an Excel sheet. I have to follow some style guidelines. So what I want to do is, get the information of the clipboard formats, and replace specific text. That way, if I paste into Excel, I will have the same style as the cells that I copied (with placeholders).
As an example: If I copy those cells:
I want to replace %NAME%
with Marvin Wendt
and %AGE%
with 21
.
Then, when I paste into Excel, it will look like this:
Another use case would be custom HTML styling. That way, we could put styled text into the users clipboard, which then can be pasted in programs like Word or other editors (maybe also online Editors like WordPress).
Currently, we only support UTF-8 text and PNG-encoded image data. However, there are much more formats than that.
Let's support registering custom format and handlers so that this package can help any other unregistered format. API design could be: