Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using hyphenator.js into Monocle #9

Closed
elmimmo opened this issue Oct 17, 2010 · 2 comments
Closed

Using hyphenator.js into Monocle #9

elmimmo opened this issue Oct 17, 2010 · 2 comments

Comments

@elmimmo
Copy link

elmimmo commented Oct 17, 2010

I tried integrating hyphenator.js in the test book totc, but I cannot get it to work with Monocle (no problem using it in standalone simpler webpages).

I tried loading the script in the <head>:

<script type="text/javascript" src="hyphenate.js"></script>

And adding class="hyphenate" (which is what I set hyphenator.js to look for in its mergeAndPack-Tool) to either <body> or each <div id="part…">.

Any experience/hint on integrating it into Monocle?

@joseph
Copy link
Owner

joseph commented Oct 17, 2010

I doubt it would work using the class-name thing. What you'd want to do is hook into the 'componentchange' event, triggering the hyphenator.js code to run over the newly loaded component.

Here's some example code of listening to the componentchange event and redirecting internal links: http://gist.github.com/558293 — you could adapt that to run the hyphenation routine.

@joseph
Copy link
Owner

joseph commented May 2, 2011

Marking as closed due to inactivity. CSS3 hyphenation has increasing support (esp on iOS), and that's the Monocle recommendation. Re-open if unaddressed.

@joseph joseph closed this as completed May 2, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants