dokuwiki-plugin-mdpage icon indicating copy to clipboard operation
dokuwiki-plugin-mdpage copied to clipboard

Feature request: toolbar and live preview which is implemented by Markdownextra plugin

Open brzGatsu opened this issue 6 years ago • 5 comments

Hello,

it's great to finally get an actively maintained MD plugin for Dokuwiki again! One thing that would be crucial for us is a markdown toolbar and (less important) a live preview like the markdownextra plugin provides. One downside markdownextra has for this feature is that the the page name needs to end with .md which is quite unportable, so it would be great if this feature didn't rely on the page name. Thanks for your consideration!

brzGatsu avatar Nov 09 '18 10:11 brzGatsu

@brzGatsu Thanks for requesting.

One thing that would be crucial for us is a markdown toolbar and (less important) a live preview like the markdownextra plugin provides.

I didn't know that markdownextra plugin have such powerful and useful features. I need more information and your experiences for the features because I have less knowledge for that plugin; I haven't used markdownextra plugin because this plugin already had not run on DokuWiki before I tried to use.

  • Toolbar: This provides buttons to help writing Markdown such as DokuWiki editor, right?
  • Live preview: This provides preview area such as DokuWiki editor and realtime rendering, right?
  • Markdown page: Above features are provided on only Markdown page and we cannot write contents by DokuWiki syntax on Markdown page, right?

P.S.

I think live preview should be provided as DokuWiki feature. So, I'll try to implement live preview as another DokuWiki plugin and not only for Markdown.

mizunashi-mana avatar Nov 09 '18 12:11 mizunashi-mana

You are correct about all the assumptions. When you create a page with the id ending with .md, the dokuwiki toolbar and syntax are disabled and a markdown toolbar with buttons like bold, h1 etc is shown. However, like I said, I dont find the requirement for the page id to be ending with .md so great.

My suggestion would be to always show the markdown toolbar additionally to the dokuwiki toolbar. Maybe it is possible to dynamically show/hide it based on the presence of the markdown tag? Not neccessary though for us.

Live preview as a seperate plugin sounds good too. The advantage of a live preview would be that you don't have to click the preview button (which also resets the cursor position in the editor -.-)

brzGatsu avatar Nov 09 '18 13:11 brzGatsu

@brzGatsu I understood. Thanks for more detail. I'll research whether I can provide any implementation, and report the result to this issue as soon as possible.

mizunashi-mana avatar Nov 09 '18 13:11 mizunashi-mana

Thanks a lot! One thing I forgot, according to their repo (https://github.com/naokij/dokuwiki-plugin-markdownextra/) they used Meltdown (https://github.com/iphands/Meltdown ?) for both, the toolbar and the live preview. Maybe this helps.

brzGatsu avatar Nov 09 '18 14:11 brzGatsu

@brzGatsu Hi! I researched for this.

Toolbar: I may implement this feature soon. Wait a minite. And, I separated this issue to #38 .

Live preview: This is more difficult feature than I thought and already known idea: https://github.com/splitbrain/dokuwiki/issues/1444 . We must use the server-side engine for rendering, so, I think it requires more server capacity; if we could render on browser (Meltdown do such), I wouldn't worry about that. Therefore, I think we can select only auto preview with an interval. Any ideas or sure?

mizunashi-mana avatar Nov 10 '18 12:11 mizunashi-mana