Are you ready to convert the original article content to the markdown format? Is there any good idea or tool?

Source: Internet
Author: User
The original database stores all html-format articles. How can I convert them to markdown format and save them back? Some of the html-to-markdown php classes found are not performing well and cannot be parsed. For example, the alttitle bit replacement of & amp; lt; img & amp; gt; won't be converted. Javascript is better than php, and the original database stores all html-format articles. How can I convert it to markdown format and save it back?

Some of the html-to-markdown php classes found are not performing well and cannot be parsed. For example, the alt/title bit replacement won't be converted.

Js is better than php, but js must be read to the browser and then submitted to the database in the browser. If it is JavaScript, the idea is as follows:

  1. After reading the result, the js variable is output to $iner.html (js variable)

  2. Read $ container. text () again and submit it to the database.

In this way, we mainly consider/

/All filtered

Is there any simpler or better tool?

Reply content:

The original database stores all html-format articles. How can I convert them to markdown format and save them back?

Some of the html-to-markdown php classes found are not performing well and cannot be parsed. For example, the alt/title bit replacement won't be converted.

Js is better than php, but js must be read to the browser and then submitted to the database in the browser. If it is JavaScript, the idea is as follows:

  1. After reading the result, the js variable is output to $iner.html (js variable)

  2. Read $ container. text () again and submit it to the database.

In this way, we mainly consider/

/All filtered

Is there any simpler or better tool?

Https://domchristie.github.io/to-markdown/

Markdown can use html code. (Of course, some do not support the parser.

If you have obsessive-compulsive disorder, you should not say so.

The markdown rule is simple. You can write a program on your own.

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.