Make the settings for Hyphenator. Leave empty textfields empty for the default value to be set. If no special configuration is made, there will be no Hyphenator.config(); function in the output.
Don't hyphenate words shorter than this value (leave empty for default value 6)
A value lesser than 4 makes no sense. By increasing this value lesser words will be hyphenated, thus, there's a small speed gain.
The hyphen char for words (leave empty for ­)
The hyphen char for URLs and E-Mail (leave empty for zero width space)
Make Hyphenator to use this language as a fallback
At best you define the language by using the lang-Attribute in your HTML-Document. But sometimes this isn't possible. In this case you can set the language here. Use a two-letter language code (e.g. en for English).
Hyphenate the Document when Hyphenator.run() is called.
Sometimes you like to run the script, prepare everything, but not to hyphenate yet.
Hyphenation can later be executed by calling Hyphenator.toggleHyphenation()
Enable remote loading of language patterns.
By enabling remote loading Hyphenator will automatically load language patterns of supported languages when they are needed.
If you turn off remote loading Hyphenator only hyphenates texts in languages it has the patterns for. Make sure you have them selected!
Once a word is hyphenated it is cached, thus a word has only to be hyphenated once. You can turn this mechanism off – mainly for performance-measuring.
Remove hyphenation when copying text
Browsers don't remove soft hyphens from copied text. By enabling this feature hyphenation is removed on copy. This only works in browsers that support the oncopy-event.
Hyphenate frames and iframes, too
By default, hyphenator doesn't hyphenate text in frames. You can turn this on, but it will only work on frames that fullfill the same origin policy!
Store settings over page reload (only if DOMStorage is available).
With this option enabled, all configuration options are stored in a object called `Hyphenator_config` in the storage type defined by the property `storagetype` (if `storagetype is none` or storage isn't supported, nothing is stored).
By reloading or going to an other page, those settings remain set. This is very and specially usefull for the toggle-button. Be carefull with this option!
Define intermediate state (style.visibility of elements while they are hyphenated). hidden
On the other hand – if there's an error in the execution of Hyphenator.js – the text may stay invisible. Turn hiding off for debugging or if you prefer to see the redrawing of the text (setting: "visible").
Define storagetype (for modern browsers only). local
Hyphenation patterns can be stored in DOM-Storage for later reuse. You can define the method (if at all):
'local': patterns are stored locally (they will be there even after a restart)
'session': patterns are removed if the window is closed
'none': DOM-Storage is not used
Degrades gracefully, if the browser does not support DOM-Storage.
Indicate how to get the elements for hyphenation:
Standard: Collecting elements by a classname
Custom: Collecting elements by a custom Selector-Function
indicate a classname (leave empty for default "hyphenate")
Using this method Hyphenator.js searches the DOM for elements with the indicated classname. Note: an element can have multiple classnames; separate them with spaces (e.g. <div class="content hyphenate">)
Indicate a classname for elements that should NOT be hyphenated:
indicate a classname (leave empty for default "donthyphenate")
You can turn off hyphenation for elements with the indicated classname. (Note: The following elements are never hyphenated: script, code, pre, img, br, samp, kbd, var, abbr, acronym, sub, sup, button, option, label, textarea)
Indicate how the Togglebox should be displayed:
Display Toggle Box
The standard togglebox is a small button in the upper right corner of the page. By clicking on it, the user can turn off/on hyphenation. This is useful for copying or searching text on the site.
Since the standard togglebox may interfere with the design of your page, you can define it on your own.
Trigger callback function when hyphenation is done
This function is called, when hyphenation of a page is completed.
Most errors are catched and catched errors dipatch the onerror function. By default there's an alert with a predefined text. You can change this function.
By minifying the resulting script you can save some bandwith. This page uses the
pack with jsmin
1 - minimal
2 - normal
3 - aggressive