Hello,
I have a problem, LightRange not work in safari! Work in all browsers, but not in Safari.
For test the tool, I create this code:
`
<!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<!--Import jQuery before materialize.js-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="../../tutoriais/1435/materialize/js/materialize.min.js"></script>
<script src="../../tutoriais/1141/LightRange.js-master/LightRange.min.js"></script>
<script>
window.range = "";
var contador = "0";
$(".gravar").click(function(){
if(contador == "0"){
window.range = lightrange.saveSelection();
alert(window.range);
contador = "1";
}else {
window.lightrange.restoreSelection(range);
contador = "0";
}
});
$(".restaurar").click(function(){
lightrange.restoreSelection(window.range);
document.execCommand('insertHTML', false, '<img src="fdsa.png">');
});
</script>
</body>
`
What is wrong in my code?
Why not work in Safari?
The best regards,
JC
Hello,
I have a problem, LightRange not work in safari! Work in all browsers, but not in Safari.
For test the tool, I create this code:
`
What is wrong in my code?
Why not work in Safari?
The best regards,
JC