1.0.1 • Published 6 years ago
typograf-api v1.0.1
Typograf-api
Typography of the text using the web service Typograf.ru
Installation
npm install typograf-api
How to use it
var Handler = function(text,err)
{
document.getElementById('jstypo_text').value= text;// вывод в textarea
document.getElementById("text").innerHTML = text;
//text = <p>На лесопилку завезли 32 м³ леса, из которых 4 м³
//пустили под распил на 25 мм доски, длинной по 6 м.</p>
}
var str = document.getElementById('jstypo_text').value;
//str = 'На лесопилку завезли 32 м3 леса, из которых 4м3 пустили
//под распил на 25мм доски, длинной по 6м.';
textTypography(str,Handler);
In case of an error, the same text will be returned. Information about the error that occurred can be obtained from the second argument of the handler.