Csdn-markdown Editor import and export document function

Source: Internet
Author: User
Tags file url


The Csdn-markdown editor supports the ability to import markdown files, export markdown files, and HTML files both online and locally . There are three buttons on the toolbar to implement these functions. These three buttons are: Import MD files from the wire, import MD files from native, export to local.

  • The import function of the Csdn-markdown editor makes it easy to re-edit the changes based on the existing Markdown file and post the blog post.

  • The Csdn-markdown Editor's export feature makes it easy to make a local archive backup of posts posted on CSDN, or you can export them locally and upload them to CSDN code for an online archive backup.


This is a stupid hands-on multi-figure tutorial that describes how this import and export is used.

Import markdown files from the wire


Here is an example of a "it-interviews-sharing" document from one of my GitHub projects README.md .

The first step: Get the URL of the MD file you want to import and copy it down

for the MD file above GitHub, we can not directly copy the MD file to the URL after the HTML effect, because this time the URL is the HTML file URL instead of the original MD file URL, how to find the native MD file URL?

Simple, just click on the "Raw" button on the HTML effect page, as follows:

This is the real MD file URL, copied down:

https://raw.githubusercontent.com/lanxuezaipiao/IT-Interviews-Sharing/master/README.md

Step Two: Click the import from line icon on the toolbar

The third step: then pop up a "import from the Line" dialog box, we will copy the URL directly into the, click "OK" to

Wait a moment, the MD file we need is successfully brought in.

Precautions:

The red text in the Import dialog box is so eye-catching, I believe everyone has seen it, be sure to remember. If you are writing an article and suddenly want to experiment with the import function, and forget to click on the "Save" button (the red dot above indicates that you have not yet saved to the latest state ) to save to the draft box, then your hard-written article is gone.

I think when the import click on the OK button, it is better to have a detection function, if the detection of your current editor is empty, directly import, if it detects that there is content and is not saved to the latest State, a dialog box pops up, give a hint, such as "you currently have content is not saved, OK to overwrite all the current content?" ”。

Import markdown files from native

First step: Click the import from My Computer icon on the toolbar

The second step: a "Import from this Machine" dialog box appears, you can find that there are two ways to import, choose one can

This is relatively simple and will not be demonstrated.

Export markdown files to local

First step: Click on the "Export to local" icon on the toolbar

Second step: A "Export to document" dialog box appears, you can find three ways to export: Export to MD file, export to content-only HTML file, export to HTML file with template

Some people here may ask: what is the difference between the following two ways of exporting?

In fact, it can be seen literally, "HTML file with template" is more than "content-only HTML file" an HTML template, that is, the following section of the content:

<! DOCTYPE html><html><head><meta charset="Utf-8"><meta name="viewport" content="Width=device-width, initial-scale= 1.0 "><title>Article title</title><link rel="stylesheet" href="https://stackedit.io/ Res-min/themes/base.css " /><script type="text/javascript" src="https://cdn.mathjax.org/ Mathjax/latest/mathjax.js?config=tex-ams_html "></script></head><body><div class="container">......</div></body></html>

Csdn-markdown Editor import and export document function

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.