Convert rich text to HTML

I have a bunch of data formatted in such a way, which is clearly visible in the pretag:

1: Here my first row, and it is quite long... and can span over several rows. 2: This is the second row. 

However, I would like to have some control over it and possibly make it in html:

 <ol> <li>Here my first row, and it is<br/>quite long...<br/>and can span over several rows.</li> <li>This is the second row</li> </ol> 

I can not find the pre-html converter online. How can i do this?

Hooray!

+4
source share
2 answers

Common tools for converting text files to HTML are Markdown and Textile . There are many implementations of each (and Wikipedia lists of 8 implementations of JS Markdown ).

I doubt that it will, out of the box, match the specific text that you have, but the source code should make a reasonable starting point.

+2
source

Try the Wiki markup mechanism as one that uses SO .

+1
source

Source: https://habr.com/ru/post/1433760/


All Articles