ダッシュボードで Zeppelin 0.6.0 ノートブックを使用しています。
I am embedding notebooks in an iframe, a simple HTML page.
I want to disable the right click on my dashboard.
I can disable right click outside the iframe area, but I cannot disable it inside the iframe area.
I tried with all possible code available on Google like:
$( document ).ready(function() {
document.oncontextmenu = function() {return false;};
});
$(document).ready(function() {
var iframeEl = $('#iframe1').contents().get(0);
$(iframeEl).bind('contextmenu', function(event) {
event.preventDefault();
return false;
});
});
onload="disableContextMenu();" oncontextmenu="return false"
etc...
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<body style="text-align:center;position:relative;">
<div id='testing'>
<h3 align='center'>Karnataka</h3>
<iframe src="http://my_ip_Address:8080/#/notebook/2BTQV69P2/paragraph/20160829-125413_974103599?asIframe" width="1200" height="550" scrolling="no" frameBorder="0" id="iframe1" style="text-align:center;pointer-events:none;" >Browser not compatible.</iframe>
<div id="karnataka"></div>
</div>
</body>
</html>
How can I disable right click on the Notebook?
As I read it:
"It is possible if the page inside an iframe is on the same domain. While if you access the page of a different domain inside an iframe, then it is not recommended."
Anyone came across this scenario and found any solutions?
Other than iframe how can I embed it in my dashboard?