Hallo,
ich möchte gerne eine JavaScript Funktion in meinem Code einbauen, damit ich den Inhalt im iFrame (konkreter: ePub) markieren kann. So wie ich es aktuell mache, kann ich alles auf der Webseite markieren, außer den Inhalt im Iframe.
Danke.
HTML
<!doctype html><html lang="en">
<head> <meta charset="utf-8"> <title>AuditApp</title> <base href="/"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" type="image/x-icon" href="favicon.ico"> <link rel="stylesheet" href="./assets/annotator.min.css"> <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/epubjs/dist/epub.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.5/jszip.min.js"></script>s://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.js"></script>
<script src="./assets/annotator-full.min.js"></script> <script src="./assets/annotator.offline.min.js"></script>
<script> window.epubHelper = function () { var myRendition; var myId; var myBook; this.init = function (id) { myId = id; };
this.open = function (url) { var book = ePub(url);
var rendition = book.renderTo(myId, { methode: "continuous", width: "100%", height: "100%", spread: "always" });
rendition.display(); myRendition = rendition; myBook = book; };
// next page this.next = function () { myRendition.next(); }
// previous page this.prev = function () { myRendition.prev(); }
this.close = function () { myBook.destroy(); }
}
</script>
<script>
</script>
</head>
<body> <app-root></app-root>
</body>
</html>
Alles anzeigen