-
Notifications
You must be signed in to change notification settings - Fork 41
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
Anchor points to "jump to" div #49
Comments
Features don't exist until someone implements them. ;) In this case the missing feature is navigation in the editor using hyperlinks within the document. There is no work-around or alternative syntax to achieve this with this plugin so far. |
ok sweet, no probs, I thought it might have been implemented within the "markdown" library if one was implemented, I guess I might have to take a look at this myself if I can! Thanks for the confirmation! |
We use pegdown internally, both to transform Markdown to HTML and to generate an AST which is used for the various editor features (syntax highlighting, navigator window, etc.). Unfortunately embedded HTML elements are represented as merely that, either inline or block HTML elements. There is no special treatment for hyperlinks or anchors in pegdown. |
There is a feature request for automatically inserting an id attribute when using headings: sirthias/pegdown#110. This could do the trick. This is already an Extension for example in this Python Markdown library: |
would it be possible to implement the python library (or even an other more full featured library), |
I've just realised this is only in the netbeans editor pane, the exported HTML works fine, and this is not as big of a issue I thought i might be, it seems the markdown convert does allow you to jump to "names". So if you write markdown like:
Its transformed into:
This works fine in browsers, and fine for a little workaround, You can just regenerate the file and view it, its only within the editor preview pane that this issue exists. |
Okay, I initially thought you were talking about the source pane in the editor. These links should work in the exported HTML when viewed in a web browser. They should or could also work in the JavaFX based preview for NetBeans 8. |
Great thanks, I'll have to give V8 a try, I take it the plugin is 100% compatible with Netbeans V8? |
I was trying to achieve the following:
http://stackoverflow.com/a/7335259/711308
I should be able to write something like:
On click of the 'Table of contents' links, I should be able to jump to the named div, but this does not seem to work. I think it works on the first click (although it doesn't take you to the correct div), and after the first click, nothing happens.
This is a great feature of markdown, and would be so useful for creating documentation (which is what I would like it for).
You can use a div with an id (in plain HTML) to achieve the same thing, but this defeats the point of markdown (and the plugin), as you cannot use markdown within the div (So I would have to HTML code everything within the div, and then its not Markdown anymore, but its plain HTML!).
Any ideas of a fix or workaround to work in flow-netbeans-markdown? (Can I use any other markdown syntax to achieve the same thing?)
Thanks
The text was updated successfully, but these errors were encountered: