-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
Support for LinkBlock
similar to ImageBlock
?
#458
Comments
Slight extension to this: there is a bit of incompatibility with the ex before: {
type: 'paragraph',
children: [
{
type: 'image',
title: null,
url: '#some-anchor',
alt: '!cta Marketing language',
}
],
} after {
type: 'image',
title: null,
url: '#some-anchor',
alt: '!cta Marketing language',
} Would it be reasonable to allow standalone |
I've been thinking about adding links, but I still have to experiment more because I want to support use cases like this one, where the link is inline (instead of a block). So I don't want to rush this one until I know how I want it to work in the future.
Does it still happen if you put |
If we change the order so that I would still love to be able to expect that a standalone or 'block' link and/or image node could be Code Hike'd successfully, as it opens up a few more options for formatting links differently (ex. converting a plan markdown link into a styled CTA button, which only needs text and a url to work). Hopefully that would no conflict with inline links? I can get the same end result by introducing MDX components and instructing authors to use them instead for now 😄 |
Hi! I see in the
isHikeElement
check (source) that paragraph and image nodes are supported and have types exported as well, but links/anchors are not.In a PoC that I'm building with Code Hike I'm trying to let users declare a custom button, say a call to action that should be styled nicely based on the page template, so I'd want a template something like this:
Right now this doesn't work and the wrapper component will just receive
children
as props. If I change the node to an image, it works, but that'd be a weird syntax to communicate to authors.eg this is functional and usable, but not syntactically ideal for authors:
I have viable alternatives in terms of passing props directly to the component, etc, but this could be a nice addition if support wasn't omitted for functional reasons 😄
The text was updated successfully, but these errors were encountered: