Community
    • 登入

    [New Plugin] MarkdownViewer++

    已排程 已置頂 已鎖定 已移動 Notepad++ & Plugin Development
    htmlpluginpdfmarkdown
    25 貼文 10 Posters 47.5k 瀏覽
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • neaN
      nea
      最後由 nea 編輯

      Hi there

      As I wasn’t able to find something similar very quickly (there probably is. . .), I decided to build a plugin to render the current file in a dockable window as a rendered HTML to see all changes and markup “beautified” in an instant. It can be found at GitHub MarkdownViewer++.

      Why? What for?
      I am writing everything in Markdown syntax ^^# As such, I also export HTML and PDF files and I am constantly checking how it looks etc. So far, I was using Dillinger or StackEdit. Great tools, actually awesome. That is why I used them for years now.

      But, Notepad++ is my main editor, opened 24/7 basically. And to always track my files in the browser and “export” them to local directories just didn’t seem right anymore. That is why I went for a MarkdownViewer++, with basic rendering, HTML and PDF export.

      It is my first Notepad++ plugin and credits goes to all the people in the README.md as I just assembled the their functionality to my current application case :)

      So, I just did it for my own use case. But if it finds at least one additional (and happy) user, I will be happy, too ^^ The releases can be found here. Go try, if you like to.

      I am eager for feedback. Found issues, bugs, potential enhancements etc. and will be happy to fix and add them. There are some open topics such as performance in big documents etc. which I am aware of and working on. But more feedback just increases the quality :) So, if you have any suggestions, just use the GitHub tracker and I will respond.

      Thanks a lot and Best

      OldskoolOrionO Ekkehard PofahlE 2 條回覆 最後回覆 回覆 引用 6
      • xomxX
        xomx
        最後由 編輯

        Hi,

        thanks for this plugin!

        I have tried to load several file formats (.txt, .log, .html etc.) and it works great.

        Is it possible to document all the meaningful common file formats for the MarkdownViewer++ plugin?
        Could you please add a check for these file formats in your plugin and refuse to process all the others (I accidentally loaded a bigger binary file and then the active MarkdownViewer++ plugin blocked the Notepad++ for a very long time as it evidently tried to interpret it…).

        (maybe consider renaming this plugin to something more general as I see its usability in displaying and saving to html/PDF also for the other file formats in the future…)

        1 條回覆 最後回覆 回覆 引用 1
        • neaN
          nea
          最後由 編輯

          Hey xomx

          Thanks for the positive feedback.
          Yes, it works for multiple formats. Actually, I don’t care but am just looking at the current one. Big files and binary are still a bummer.

          But you brought up a good point. I will probably add some checks for file formats, offer a configuration for these and think about loading/processing it asynchronously to try to circumvent blocking as much as possible. I will make myself a ticket and see, when I will have time to add this. But that’s also a reason, why I am not versioning it 1.0.0 ^^… at least for now… still a long way to go :)

          Regarding the naming: Yeah, actually I had the same idea but I want to focus on Markdown and ensure that functionality first. As long as that is the focus, I will run with the given name.
          But maybe future major versions or derived plugins will extend on that. Thanks for the hint.

          Best

          1 條回覆 最後回覆 回覆 引用 0
          • chcgC
            chcg
            最後由 編輯

            Maybe similar to https://github.com/gclxry/NppMarkdown.

            For x64 support of https://github.com/nea/MarkdownViewerPlusPlus/tree/master/MarkdownViewerPlusPlus/PluginInfrastructure, see

            https://notepad-plus-plus.org/community/topic/12633/npppluginnet-64-bit.
            and
            corresponding project https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net

            1 條回覆 最後回覆 回覆 引用 0
            • neaN
              nea
              最後由 編輯

              Hi chcg

              Yes, thanks for pointing that out. Regarding that link: I found that, too and also read up about it in this thread https://notepad-plus-plus.org/community/topic/13156/nppmarkdown-link-broken. But I was actually to lazy to compile it myself and just went straight for testing my own ^^’

              Regarding x64 support: I am already using the newest NPPPluginPack.net version and also worked with the current PR and changes but wasn’t able to get it fixed quickly, why this is still on my ToDo list and will be done… but some more features and bugfixes first :)

              Thanks a lot

              1 條回覆 最後回覆 回覆 引用 1
              • Kasper GraversenK
                Kasper Graversen
                最後由 編輯

                Great stuff. Did you find the plugin pack easy to use (https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net)? If you like it, please link to it from your readme - I’d be nice with some traction and more people to help out with maintaining it. And linking to it is the first step in that direction ;-)

                cheers
                Kasper

                1 條回覆 最後回覆 回覆 引用 0
                • neaN
                  nea
                  最後由 編輯

                  Hey Kasper

                  Actually, it is the first link in my README.md under “License and Credits” as I would never take credit for your plugin pack. I hope that linkage and usage is fine for you. Otherwise, let me know.

                  It was an ease to use, especially with the Demo Plugin. Big thanks for that :) And after your hint to ILMerge and figuring out some stuff it worked even better.

                  Thanks and Cheers

                  1 條回覆 最後回覆 回覆 引用 1
                  • Kasper GraversenK
                    Kasper Graversen
                    最後由 編輯

                    Hi @nea

                    Sorry I didn’t mean to say that due credits were not given! ;) I just overlooked that first bullet in the readme. Great to know that ilmerge worked. If you feel like it, it’d be great if you could jot down your experiences and setup for using 3rd party dll’s with the plugin pack - somewhere a suitable section should be created in the readme. If you feel like it that would be awesome! Looking forward to a PR :-P

                    btw. I’ve linked from the plugin pack to your plugin ;)

                    cheers

                    1 條回覆 最後回覆 回覆 引用 1
                    • neaN
                      nea
                      最後由 編輯

                      Hi everyone

                      I just released an updated version 0.5.0 with several changes

                      • @xomx I added an options dialog to allow some configuration. For example you can configure file extensions that should be rendered
                      • Several bug fixes have been made (big thanks to @dail)

                      You can find the newest releases at https://github.com/nea/MarkdownViewerPlusPlus/releases.

                      The changes are bigger so there may be issue popping up. You can always leave a note at https://github.com/nea/MarkdownViewerPlusPlus/issues and I will see to it being fixed as quick as possible.

                      Upcoming additions will be:

                      • Asynchronous rendering to improve the behaviour with large documents
                      • View rendered HTML on-the-fly
                      • and everything you and I can think of :)

                      Thanks a lot and Cheers

                      1 條回覆 最後回覆 回覆 引用 0
                      • neaN
                        nea
                        最後由 nea 編輯

                        Hey

                        A quick follow-up-update with version 0.6.0. Thanks @xomx and @dail for finding and reporting issues with 0.5.0.

                        • Updated to the newest NotepadPlusPlusPluginPack.net version by @Kasper-Graversen
                        • @chcg With the update of the plugin pack I started producing x86 and x64 releases

                        You can find the newest releases at https://github.com/nea/MarkdownViewerPlusPlus/releases

                        Again, should you discover any bugs, post them at https://github.com/nea/MarkdownViewerPlusPlus/issues and I will get to it as fast as I possibly can.

                        Thanks and Cheers

                        1 條回覆 最後回覆 回覆 引用 2
                        • xomxX
                          xomx
                          最後由 編輯

                          Tried a simple SVG file to render but with no luck, is it really working?

                          my sample:

                          <?xml version=“1.0”?>
                          <!DOCTYPE svg PUBLIC “-//W3C//DTD SVG 1.1//EN”
                          “http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd”>

                          <svg xmlns=“http://www.w3.org/2000/svg”
                          width=“467” height=“462”>
                          <rect x=“80” y=“60” width=“250” height=“250” rx=“20”
                          style=“fill:#ff0000; stroke:#000000;stroke-width:2px;” />

                          <rect x=“140” y=“120” width=“250” height=“250” rx=“40”
                          style=“fill:#0000ff; stroke:#000000; stroke-width:2px;
                          fill-opacity:0.7;” />
                          </svg>

                          1 條回覆 最後回覆 回覆 引用 0
                          • neaN
                            nea
                            最後由 編輯

                            Hi

                            How was the SVG embedded, so how was the url to the SVG?

                            Thanks

                            1 條回覆 最後回覆 回覆 引用 0
                            • xomxX
                              xomx
                              最後由 編輯

                              URL?
                              I used the very svg file (see the above) and also the same in a simple html file like:

                              <html>
                              <head>
                              <meta http-equiv=“Content-Type” content=“text/html; charset=UTF-8” />
                              <title>SVG test</title>
                              </head>
                              <body>
                              <svg xmlns=“http://www.w3.org/2000/svg” width=“467” height=“462”>
                              <rect x=“80” y=“60” width=“250” height=“250” rx=“20” style=“fill:#ff0000; stroke:#000000;stroke-width:2px;” />
                              <rect x=“140” y=“120” width=“250” height=“250” rx=“40” style=“fill:#0000ff; stroke:#000000; stroke-width:2px; fill-opacity:0.7;” />
                              </svg>
                              </body>
                              </html>

                              1 條回覆 最後回覆 回覆 引用 0
                              • neaN
                                nea
                                最後由 編輯

                                Hi @xomx

                                Ok, then maybe it came of wrong.

                                The MarkdownViewer++ does not render SVG files in Notepad++. It renders SVG files from sources, embedded inside a Markdown file. Sorry if that got of wrong.

                                As I mentioned, I wanted to focus first on Markdown files, even if direct SVG rendering would be possible right now.

                                There was an issue in an earlier version where the used renderer library didn’t support SVG natively. So, I added it… for according links/URLs in the Markdown file. That is what I fixed and what should work at the moment.

                                Sorry about any confusion

                                PS: If you like to see that feature in the future, maybe add it as issue and I will see how I can generalize the rendering functionality in the future ^^
                                Thanks

                                1 條回覆 最後回覆 回覆 引用 0
                                • xomxX
                                  xomx
                                  最後由 編輯

                                  Ok, I see now.

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • neaN
                                    nea
                                    最後由 編輯

                                    Hi

                                    Update 0.7.0 has just been released.

                                    Some more new features/additions have been made besides some smaller bugfixing:

                                    • Added a menu action to print the rendered content directly
                                    • Added margins configuration for PDF exports
                                    • Added a menu action to copy the rendered content to the clipboard
                                    • Added options to open an exported PDF/HTML after the action completed
                                    • Added a menu action to send content as HTML/Text E-mail (requires Outlook)

                                    You can find the newest release at https://github.com/nea/MarkdownViewerPlusPlus/releases

                                    Should you discover any bugs, post them at https://github.com/nea/MarkdownViewerPlusPlus/issues and I will get to it as fast as I possibly can.

                                    Thanks a lot and Cheers

                                    1 條回覆 最後回覆 回覆 引用 1
                                    • AlexA
                                      Alex
                                      最後由 編輯

                                      此回覆已被刪除!
                                      1 條回覆 最後回覆 回覆 引用 0
                                      • OldskoolOrionO
                                        OldskoolOrion @nea
                                        最後由 編輯

                                        @nea This is one of those times, I come across something and feel the need to slap myself on the forehead and go “DOOH” Homer Simpson-style… A lot of colleagues and I work A LOT with markdown since it’s fast to write, and very little effort to write a lot of descriptive text - for instance complex unstructured datasets while research is ongoing - and still make it look good and professional… only downside with describing datasets is, that there is NO way around not checking regularly to how it looks in output, especially since records or JSON sets can get very long - describing fields in blocks lining up with what could be a relationship… writing them in an online tool isn’t ideal and so wasn’t switching between windows either… and that’s why not thinking of a plugin myself or any colleague I regularly work together with, is pretty stupid actually for a bunch of scientists :-) Shows again that visionaries in one field, can be blind as a bat in a different field :-) I like the plugin a lot sofar and had no trouble in convincing others to give it a go… sending the link to your github did the trick :-) Thank you !

                                        1 條回覆 最後回覆 回覆 引用 0
                                        • Ethan PiliavinE
                                          Ethan Piliavin
                                          最後由 編輯

                                          Would you consider a dark theme option for those of us that enjoy to work in the dark?

                                          1 條回覆 最後回覆 回覆 引用 0
                                          • ?
                                            舊使用者
                                            最後由 編輯

                                            此回覆已被刪除!
                                            1 條回覆 最後回覆 回覆 引用 0
                                            • 第一個貼文
                                              最後的貼文
                                            The Community of users of the Notepad++ text editor.
                                            Powered by NodeBB | Contributors