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

Standard controls within a book #7

Closed
MidnightRyder opened this issue Jun 10, 2010 · 3 comments
Closed

Standard controls within a book #7

MidnightRyder opened this issue Jun 10, 2010 · 3 comments

Comments

@MidnightRyder
Copy link

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.)

@fmundaca
Copy link

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 :)

@joseph
Copy link
Owner

joseph commented Oct 5, 2010

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.

@joseph
Copy link
Owner

joseph commented Oct 5, 2010

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:

http://gist.github.com/558293

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.

This issue was closed.
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

3 participants