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

Inline components #187

Closed
nobkd opened this issue Feb 4, 2024 · 4 comments
Closed

Inline components #187

nobkd opened this issue Feb 4, 2024 · 4 comments
Labels
improvement nuemark Related to nuemark package

Comments

@nobkd
Copy link
Collaborator

nobkd commented Feb 4, 2024

Is there a way to use components inline with []-syntax in Markdown?

Like

# Title

text [component-name] stuff...

More text [.class-name] etc.

[clock] 00:00 - some time
@tipiirai
Copy link
Contributor

tipiirai commented Feb 5, 2024

Currently no, but would make sense. This requires an understanding of Marked internals. This thread may offer a solution.

@nobkd
Copy link
Collaborator Author

nobkd commented Nov 3, 2024

Should be supported on dev branch

@nobkd nobkd closed this as completed Nov 3, 2024
@goblinfactory
Copy link
Contributor

goblinfactory commented Jan 29, 2025

Was this closed in error?

I've just tried creating a custom component, and I've tried simply using inline <span>s.
So the simplest requirement of custom formatting a single word in a sentence is currently NOT possible.

For example,

# Some heading

Here is a sentence with the name of the car in red. I drive a <span class='red'>Ford</span> to work. 

Using the latest version of Nue the above is still not possible to do using markdown in Nue.
Maybe I've missed something? I also was unable to do any of kind of any inline formatting even using a custom component.

@nobkd
Copy link
Collaborator Author

nobkd commented Jan 31, 2025

@goblinfactory

This issue was to allow inline nuemark tags from custom html tags.

Nuemark doesn't support html tags (currently), but with #470 you then would be able to at least do the following: I drive a [.red "Ford"] to work.

Currently also trying to implement a fallback to simple html rendering, if the component name is not registered as custom, and is a standard html element. (for both block and inline)

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

No branches or pull requests

3 participants