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

A very minimal, but functional viewer for Markdown files. #5891

Merged
merged 1 commit into from
Apr 27, 2023

Conversation

lkishalmi
Copy link
Contributor

Well, I was missing the Preview functionality for Markdown files. I used some plugins a few years ago. I think the plugin portal is down at the moment, so I could not find that. I came up with something very basic. It uses the existing flexmark library we ship with the IDE. I do not think it's bulletproof, but better than nothing. Regarding that the implementation so simple, its a shame I have not done it earlier, so it could be in NB18.

image

@lkishalmi lkishalmi added this to the NB19 milestone Apr 27, 2023
@BradWalker
Copy link
Member

I really like it! It's also going to be helpful to me.

@mbien mbien linked an issue Apr 27, 2023 that may be closed by this pull request
2 tasks
Copy link
Member

@mbien mbien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great! seems to be a good use case for the split editor view.

@lkishalmi
Copy link
Contributor Author

BTW aren't the split actions are mixed up? Split vertically would do a horizontal split and split horizontally does a vertical split. Or that is just mixed up in my head?

@Chris2011
Copy link
Contributor

Chris2011 commented Apr 27, 2023

Great news, thx. You haven't heard of this plugin, right? https://github.com/moacirrf/netbeans-markdown It is great and powerful, but has also some problems while syncing the scroll position etc. I like the idea to have it inside the core.

@neilcsmith-net
Copy link
Member

Looks great! It's simple, but something to build on if need be.

BTW aren't the split actions are mixed up? Split vertically would do a horizontal split and split horizontally does a vertical split. Or that is just mixed up in my head?

I think that's just your head! 😉 At least, it's the way I would expect them to be - split horizontally, put side by side, split vertically, put one on top of the other.

@lkishalmi lkishalmi merged commit 690b427 into apache:master Apr 27, 2023
@johnmanko
Copy link

Will this support color themes? The code blocks should stand out more.

@lkishalmi
Copy link
Contributor Author

lkishalmi commented Aug 30, 2023

Will this support color themes? The code blocks should stand out more.

Theoretically we can do some basic color/style support by adding some CSS. Tough that's really far from my expertise.

I can start a PR though, if anyone would show up doing the real CSS work, I can make sure that those styles are applied in the "Viewer"

@Chris2011
Copy link
Contributor

I can do the css :)

@johnmanko
Copy link

Thanks @lkishalmi and @Chris2011

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

Successfully merging this pull request may close these issues.

Add preview for markdown files
6 participants