hyphe-lib-ger.js
Add soft-hyphens to German text
About
Using the packages hypher and hyphenation.de to parse a normal, German text adding soft-hyphens to allow soft-hyphens in older browsers and Google Chrome.
New: Use typographizer-js to produce better looking typography
Install
In your terminal use
npm i --save hyphe-lib-ger
In your JavaScript file use
const hyphe = ;
Usage
;
Text: String A String with the text to parse
Options: Object The possible options (not required)
Options
typographize: Boolean (default: false)
- parse the text with typograhize-js first
ignoreLineBreaks: Boolean (default: false)
- ignore line breaks completely?
escapeToHTML: Boolean (default: true)
- escape all non-word characters to their HTML charcode alternative
Example
const hyphe = ; ; /*Will return:Lass mich dir kurz vor­stel­len, was hier ei­gent­lich mög­lich ist: “Hal­lo, mein Na­me ist Da­ni­el”*/
Example
A working example with this lib and Angular6 is seen here