text_to_html
Converts ordinary text into HTML
Note
This is still in the very early stages. Beware.
Node.js install
npm install text_to_html
Guidelines
One new line is converted to a <br>.
Two are converted to a <p>
Three or more are treated like a page break: <p style="page-break-before: always"</p>
Images are added like so on a single line:
[path.jpg]
Some text below the image.
Images can also be inlined into text:
[image1.jpg right]
[image2.jpg left]
This text will be in between the images.
Optional data can be added to a paragraph:
{"class":"special_class"}The paragraph text goes here.
Properties can be added to an image too:
{"height":5}[image.png]
Descriptive properties:
At the very beginning, properties can be added to describe the document.
{
"key1": "value1",
"key2": "value2"
}
These properties will be returned for further post processing if desired.