In the process of preparing the 3rd version of the Typographer, he wrote a small jQuery-plugin, which will necessarily be included in the release, which can make life easier for many website developers in the matter of typography.
The task was the following: to make a javascript typographer, a la “Punto Switcher”, capable of typesetting the necessary characters when typing, without accessing the web service. It was also very important not to visually spoil the plain-text with inserts of mnemonic characters, so that an unprepared person could easily integrate into the typography process.
We had to sacrifice a lot and concentrate only on a few basic rules that cover about 82% of typography needs (statistics are collected on the basis of 10 thousand texts processed on the site
http://typograf.ru ).
Example')
What does the typographer do?
Makes text inside text fields automatically or on request.
- Able to impose quotes (Christmas trees, paws are customizable);
- dash in direct speech;
- special characters: ...,,,, â‚˝;
- able to put a minus between numbers and Ă— between dimensional units.
When typing does not touch the tags and HTML comments.
GitHub link
Important! jQuery.Typograf.js is not a complete replacement for the online service!
At the request of
StopDesign added typography by clicking on the button and roll back to the source text.