Skip to content

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

Merged
lkishalmi merged 1 commit into
apache:masterfrom
lkishalmi:markdown-viewer
Apr 27, 2023
Merged

lkishalmi merged 1 commit into
apache:masterfrom
lkishalmi:markdown-viewer

Conversation

@lkishalmi

Copy link
Copy Markdown
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
Copy Markdown
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
1 of 2 tasks

@mbien mbien left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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

Chris2011 commented Apr 27, 2023 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown

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

@lkishalmi

lkishalmi commented Aug 30, 2023 •

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Contributor

I can do the css :)

@johnmanko

Copy link
Copy Markdown

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