Comments (13)
Ideally I think you'd allow the user to create custom link styles. One solution would be to allow a user to create one or more named link styles (Markdown, Dockuwiki, MediaWiki, HTML ... whatever) and then define a link text template for each style ...
- Markdown =
"[${title}](${link})"
- Dokuwiki =
" [[${link}|${title}]]"
- HTML=
"<a href='${link}'>${title}</a>"
The user would then select this named style when they copy a link.
Users like me are likely to want to frequently use all the different link styles at different times and so be able to quickly choose the link format when I copy a link (not have to navigate inside the extension options to re-select a link style every time). So if you added this I'd make the link styles names appear on the link menu that appears when you perform the link copy. They could appear be a "checked" menu option that does not close the menu.
So your menu might be ...
- Current Tab
- All Tabs
- Selected Tabs
- ---- Divider -----
- Markdown
- Dokuwiki
- HTML
The options can be hidden if only one style (Markdown) is defined.
from copy-as-markdown.
This looks great. At this point you are one of the only Copy Link extensions that is multiprocess. Ideally I would love for it to do everything the CoLT extension used to do (especially the "Copy Link Text" menu item, which copies a hyperlink's associated text to the clipboard).
from copy-as-markdown.
Another overnight-obsoleted extension is Easy Copy.
Easy Copy has been on my shortlist of best extensions for years
It has a simple yet very flexible configuration system which basically allows you to generated whatever markup language you need, while supporting many uses cases. Examples:
- don't select anything, copy -> becomes link to the page, with page title as link text
- select any snippet of text in the page, copy -> becomes link to the page, with the text you selected as link text <<== the one I use most
- don't select anything, right-click on link, copy -> same result as precisely selecting the link and copying it, just much easier
- the simple and powerful configuration options allow to provide the behavior of CoLT.
- copy all tabs as links (all this, whatever markup language)
Screenshots
Conclusion
- Praise "copy-as-markdown" for being compatible with Firefox 57+!
- I guess it can technically be extended to support all this. If would be soo great!
from copy-as-markdown.
This feature would be very welcome!
from copy-as-markdown.
@tohagan Thank you for your suggestion. In fact I sometimes also have need to copy links in non-Markdown format e.g. RTF, in order to paste to rich text editors like Dropbox Paper. I think the UI you proposed is simple and easy to understand. I will consider working on this feature :)
from copy-as-markdown.
Recent Firefox update destroyed almost all plugins which provide "copy link as something", except for this plugin.
Supporting "copy link as HTML, or any format you specify" feature is very helpful for Firefox users.
from copy-as-markdown.
if you do this:
another useful format is that of org-mode, which is
[[url][text]]
and another is as html link(s)
from copy-as-markdown.
Thanks very much π I think it will be a really valuable addition and hopefully not that hard to code
from copy-as-markdown.
Hello @chitsaou
Just wanted to say that i like your plugin a lot.
Do you have plans to implement this feature?
That would make it instantly 2 times better.
Please add as well Asciidotor format: http://example.com[Title of the webpage]
from copy-as-markdown.
Thanks for this extension! I frequently use it to copy a bunch of tabs into my Markdown notes. However, I prefer -
over *
for my list bullets. Can that be added as an option?
Expected Behavior
Set a preference for list bullet to -
, then "All tabs link" or "Selected tabs link" would copy:
- [chitsaou/copy-as-markdown: Copying Link, Image and Tab(s) as Markdown Much Easier.](https://github.com/chitsaou/copy-as-markdown)
- [Copy as Markdown - Chrome Web Store](https://chrome.google.com/webstore/detail/copy-as-markdown/fkeaekngjflipcockcnpobkpbbfbhmdn?hl=en)
- [Copy as Markdown β Get this Extension for π¦ Firefox (en-US)](https://addons.mozilla.org/en-US/firefox/addon/copy-as-markdown/)
Actual Behavior
* [chitsaou/copy-as-markdown: Copying Link, Image and Tab(s) as Markdown Much Easier.](https://github.com/chitsaou/copy-as-markdown)
* [Copy as Markdown - Chrome Web Store](https://chrome.google.com/webstore/detail/copy-as-markdown/fkeaekngjflipcockcnpobkpbbfbhmdn?hl=en)
* [Copy as Markdown β Get this Extension for π¦ Firefox (en-US)](https://addons.mozilla.org/en-US/firefox/addon/copy-as-markdown/)
from copy-as-markdown.
Like @bhrutledge, I would prefer my copied text use -
as the list bullet instead of *
. I donβt have time right now to try to edit this extension, but here are some notes towards developing that feature.
This is the function that writes *
as the list bullet:
copy-as-markdown/src/background/markdown.js
Lines 38 to 40 in e990a32
The simplest edit to that file that would support customizing the list bullet and nothing else might be this:
export function list(theList) {
const bulletCharacter = userOptions.bulletCharacter || '*';
return theList.map((item) => `${bulletCharacter} ${item}`).join('\n');
}
Then src/lib/options-manager.js would need to be edited to support storing a bulletCharacter
option, and src/ui/options.js and src/ui/options.html would have to be edited to support the user editing that option. The editing interface would be either radio buttons or a pop-up menu. The buttons or menu would have two options: *
and -
.
The template-based customization feature described in tohaganβs comment sounds more useful than just being able to customize the bullet character, and it would solve my problem. However, it sounds more complicated to implement.
from copy-as-markdown.
As an alternative to adding an bullet customization option as I described above, we could change the hard-coded bullet character from *
to -
by editing the list
function. Do any current users of the extension (including its author) actively prefer *
over -
, or was *
an arbitrary choice? I prefer -
for various reasons, including that it matches Prettierβs Markdown formatting.
from copy-as-markdown.
Related: #98
from copy-as-markdown.
Related Issues (20)
- Manifest V3 Migration HOT 4
- Doesnt work on Chrome AppImage (Linux) HOT 3
- Right click menu in firefox 104 is missing HOT 16
- Firefox 106: Context Menu occationally disappear HOT 31
- Chrome 107: Keyboard shortcut triggers "Reading Clipboard" warning HOT 22
- Permission needed to read and change data in Firefox 109.0 (64-bit) och MacOS HOT 3
- Not Working when using keyboard shortcut HOT 3
- shortcut not work under Chrome, works under firefox HOT 3
- "Copy All Tabs" is mislabelled or buggy HOT 1
- Deprecate build script in favor of esmodule HOT 1
- Generated link title contains reserved characters (Brackets) in version 2.7.1 HOT 2
- Copy Chrome tab groups HOT 3
- Dark mode support HOT 2
- RFE - if possible, provide some type of regex filtering to mask out certain parts of the page titles
- [Brainstorming] Custom Format
- E2E Testing HOT 1
- Copy Page Selection should resolve relative links to absolute URLs HOT 1
- Different indent character option for tab groups HOT 3
- [Feature Request] Copy as footnote
- Feature request: Change Markdown bullet list character HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from copy-as-markdown.