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