imzbf / md-editor-v3

Markdown editor for vue3, developed in jsx and typescript, dark theme、beautify content by prettier、render articles directly、paste or clip the picture and upload it...
https://imzbf.github.io/md-editor-v3
MIT License
1.51k stars 145 forks source link

Saving Markdown Source from the MdEditor to a Local File #612

Closed kermitmei closed 1 month ago

kermitmei commented 1 month ago

Describe the issue

Thank you for developing this library.

I am trying to save the Markdown source from the editor to a local file. However, the save button on the MdEditor does not seem to trigger any response.

Could you please guide me on how to achieve this?

Alternatively, is there another method to implement this functionality?

Thank you very much!

Procedure version

4.17.4

Reproduction link

No response

imzbf commented 1 month ago
  1. For the way to save content, you will need to use Blob-related technologies.
  2. If you need to place a button on the toolbar, you can refer to this example.
kermitmei commented 1 month ago
  1. For the way to save content, you will need to use Blob-related technologies.
  2. If you need to place a button on the toolbar, you can refer to this example.

Thank you for your response.

Based on point 2 of your reply, does this mean that I cannot use the default save button and would need to place a new save button on the toolbar, bind a corresponding handler to it, and then use Blob-related technologies to implement the saving functionality?

imzbf commented 1 month ago

You can use the default save button and then trigger the save method in the onSave event.