The original database is saved in HTML format article, how to convert to markdown format, and then save it back?
Found a few HTML to Markdown PHP class performance is not good, there are many can not parse, such as the Alt/title location change will not convert.
JS is better than PHP, but JS must be read to the browser, and then the browser to submit to the database. If it is JS, the idea is this:
After reading to the JS variable, then JS variable output to $container.html (JS variable)
Re-read $container.text () in the commit to database
To do so, the main consideration is that some can not be transferred// are filtered
Is there a simpler, or better tool?
Reply content:
The original database is saved in HTML format article, how to convert to markdown format, and then save it back?
Found a few HTML to Markdown PHP class performance is not good, there are many can not parse, such as the Alt/title location change will not convert.
JS is better than PHP, but JS must be read to the browser, and then the browser to submit to the database. If it is JS, the idea is this:
After reading to the JS variable, then JS variable output to $container.html (JS variable)
Re-read $container.text () in the commit to database
To do so, the main consideration is that some can not be transferred// are filtered
Is there a simpler, or better tool?
https://domchristie.github.io/to-markdown/
Markdown originally can be used in HTML code (of course, the specific look at the parser, some do not support), so the conversion does not affect the resolution.
If you have obsessive-compulsive disorder, then let me not say.
Markdown rules are simple, you can write a program.