Closed frantic closed 10 months ago
Latest commit: 44a52e33d30923a3000b47850771ac767e10b4b1
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
I've renamed onOpenFile
to onOpenComponent
and made the callback accept Source
instead of path
. The users who want an advanced control over what happens can provide their own implementation that formats it and calls external API (via window.open
, postMessage
, fetch
, etc.)
@ericclemmons do you think we can move forward with this? Would you rather see a different approach?
Great, as far as I know this method can support the following four situations:
This PR adds support for
onOpenFile
callback. When set, it will be called instead of opening the file with the default editor. This change will enable the support for the long tail of editors and will allow other products to build on top ofclick-to-component
.Usage
Fixes https://github.com/ericclemmons/click-to-component/issues/28