Typograf-api
Typography of the text using the web service Typograf.ru
Installation
npm install typograf-api
How to use it
var { documentvalue= text;// вывод в textarea documentinnerHTML = text; //text = <p>На лесопилку завезли 32 м³ леса, из которых 4 м³ //пустили под распил на 25 мм доски, длинной по 6 м.</p> } var str = documentvalue; //str = 'На лесопилку завезли 32 м3 леса, из которых 4м3 пустили //под распил на 25мм доски, длинной по 6м.'; ;
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.