-
Notifications
You must be signed in to change notification settings - Fork 198
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
Standard controls within a book #7
Comments
hello, i'm having problems with monocle and phonegap. the book doesn't appear and i don't know why. i put window.reader = Monocle.Reader('book'); inside onDeviceReady function but nothing happens.. can you help me ? thanks :) |
Hi tenzai, I'm afraid I don't have any experience with the PhoneGap framework — you might get in touch with them regarding debugging tools. |
Regarding the original issue, I hope the new "panels" feature in the componentry branch takes care of this — allowing interaction with the contents of the book itself. If you want to open links to other parts of the book in Monocle itself, and external links in a separate iframe, you could take a look at this stuff I wrote for someone a while back: Yep, for this you want to hook into the componentchange event and modify the DOM of each component slightly, to open in an iframe or whatever. Here's some example code, which should work -- it's modified from some private code I'm working on: That snippet doesn't cover the InfoPane class, but it's similar to other Monocle controls: create a div with an internal iframe, expose a "go" method in the API that changes the src attribute of the iframe. |
Since Monocle supports standard HTML content, it would be great to have an easy way to allow for standard HTML controls and events within a book. That way, if the book references a website a standard link within the book pointed at a new window (so it loads in a separate tab / window) would be great for those moments when the book references URL's (rather than the user having to type them in by hand like the print versions of my books ;-) or you want to offer a "Like" link for the book within the book. (For full bore websites it's not quite as important as it might be for stand alone apps on platforms like the iPhone. Current using Monocle + PhoneGap to distribute eBook copies of my print books - works nice, by the way.)
The text was updated successfully, but these errors were encountered: