mirror of
https://github.com/ONLYOFFICE/onlyoffice.github.io.git
synced 2026-04-07 14:04:30 +08:00
Fix bug 45614
This commit is contained in:
27
code.js
27
code.js
@ -9,16 +9,17 @@
|
|||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
var language = hljs.listLanguages(), //array languages
|
var language = hljs.listLanguages(), //array languages
|
||||||
isInitLang = false, //flag init lang select
|
isInitLang = false, //flag init lang select
|
||||||
style_value, //current value style
|
style_value, //current value style
|
||||||
curLang, //current language
|
curLang, //current language
|
||||||
code_field, //field for higlight code
|
code_field, //field for higlight code
|
||||||
container, //scrollable conteiner
|
container, //scrollable conteiner
|
||||||
timer, //for timer
|
timer, //for timer
|
||||||
f_Paste = false; //flag paste
|
f_Paste = false; //flag paste
|
||||||
const isIE = checkInternetExplorer(); //check IE
|
const isIE = checkInternetExplorer(); //check IE
|
||||||
const isDE = (window.AscDesktopEditor) ? true : false; //check desktope editor
|
const isDE = (window.AscDesktopEditor) ? true : false; //check desktope editor
|
||||||
|
const isFF = (navigator.userAgent.indexOf("Firefox") > -1) ? true : false; //check FF
|
||||||
|
|
||||||
var myscroll = window.Asc.ScrollableDiv;
|
var myscroll = window.Asc.ScrollableDiv;
|
||||||
|
|
||||||
@ -29,7 +30,7 @@
|
|||||||
document.getElementById("style").href = "highlight/styles/" + e.params.data.id;
|
document.getElementById("style").href = "highlight/styles/" + e.params.data.id;
|
||||||
window.Asc.plugin.loadModule("./highlight/styles/" + e.params.data.id , function(content){
|
window.Asc.plugin.loadModule("./highlight/styles/" + e.params.data.id , function(content){
|
||||||
style_value = content;
|
style_value = content;
|
||||||
if (isDE) {
|
if (isDE || isFF) {
|
||||||
$("#jq_color").spectrum("set", (hexc($(container).css('backgroundColor'))));
|
$("#jq_color").spectrum("set", (hexc($(container).css('backgroundColor'))));
|
||||||
} else {
|
} else {
|
||||||
background_color.value = hexc($(container).css('backgroundColor'));
|
background_color.value = hexc($(container).css('backgroundColor'));
|
||||||
@ -71,7 +72,7 @@
|
|||||||
document.getElementById("language_id").style.flex ="0.95";
|
document.getElementById("language_id").style.flex ="0.95";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isDE) {
|
if (isDE || isFF) {
|
||||||
document.getElementById("jq_color").style.display ="inline";
|
document.getElementById("jq_color").style.display ="inline";
|
||||||
document.getElementById("background_color").style.display ="none";
|
document.getElementById("background_color").style.display ="none";
|
||||||
initSpectrum("#FFFFFF");
|
initSpectrum("#FFFFFF");
|
||||||
@ -84,7 +85,7 @@
|
|||||||
{
|
{
|
||||||
window.Asc.plugin.loadModule("./highlight/styles/googlecode.css", function(content){
|
window.Asc.plugin.loadModule("./highlight/styles/googlecode.css", function(content){
|
||||||
style_value = content;
|
style_value = content;
|
||||||
if (isDE) {
|
if (isDE || isFF) {
|
||||||
$("#jq_color").spectrum("set", (hexc($(container).css('backgroundColor'))));
|
$("#jq_color").spectrum("set", (hexc($(container).css('backgroundColor'))));
|
||||||
} else {
|
} else {
|
||||||
background_color.value = hexc($(container).css('backgroundColor'));
|
background_color.value = hexc($(container).css('backgroundColor'));
|
||||||
|
|||||||
Reference in New Issue
Block a user