MLcode
MLcode

Reputation: 1

How do I load the Monocle Web eBook/ePub Reader without an iFrame?

I am using the Monocle Web eBook Reader (https://github.com/joseph/monocle & http://monocle.inventivelabs.com.au/) and am looking to add the following functionality to it:

1) Text Highlighting 2) Bookmarks 3) Notes

The main question I have is: How do you load this eBook reader without an iFrame?

The reason I want this is because I want to edit the contents of this iframe to be able to add Highlights, Notes, Bookmarks, etc.

Also "mouseup/click" events are not working on the contents of the iframe... they are working on the other elements monocle plugin is creating but not on the contents of the iframe.

Any help would be appreciated. Thank you for your time!

Upvotes: 0

Views: 1045

Answers (2)

AbhilashThomas
AbhilashThomas

Reputation: 1

As per this

http://test.monoclejs.com/test/selection/index.html

the reader supports selection. Use it with the Magic Panel.

For bookmarks see this:

https://github.com/joseph/Monocle/issues/244

Upvotes: 0

Suresh Muttagi
Suresh Muttagi

Reputation: 165

Using Iframe is to make content safer side. For highlighting and other things which u need, you can make use of google's Rangy javascript. Just have some buttons (for highlight) outside the Iframe and whenever user selects a text in iframe and clicks highlight button, call a highlight function from Rangy javascript. https://code.google.com/p/rangy/

the above link will help u.....

Upvotes: 0

Related Questions