Fixed loading ep_font_color3

This commit is contained in:
SamTV12345 2024-07-17 20:24:16 +02:00
parent ccbbaa20b3
commit b0a93ccddb
7 changed files with 20 additions and 19 deletions

View file

@ -92,7 +92,8 @@ const convertTypescript = (content: string) => {
loader: 'js'
},
alias:{
"ep_etherpad-lite/static/js/browser": 'ep_etherpad-lite/static/js/vendors/browser'
"ep_etherpad-lite/static/js/browser": 'ep_etherpad-lite/static/js/vendors/browser',
"ep_etherpad-lite/static/js/nice-select": 'ep_etherpad-lite/static/js/vendors/nice-select'
},
bundle: true, // Bundle the files together
minify: process.env.NODE_ENV === "production", // Minify the output
@ -212,7 +213,8 @@ const convertTypescriptWatched = (content: string, cb: (output:string, hash: str
loader: 'js'
},
alias:{
"ep_etherpad-lite/static/js/browser": 'ep_etherpad-lite/static/js/vendors/browser'
"ep_etherpad-lite/static/js/browser": 'ep_etherpad-lite/static/js/vendors/browser',
"ep_etherpad-lite/static/js/nice-select": 'ep_etherpad-lite/static/js/vendors/nice-select'
},
bundle: true, // Bundle the files together
minify: process.env.NODE_ENV === "production", // Minify the output

View file

@ -100,7 +100,6 @@ const Ace2Editor = function () {
};
const doActionsPendingInit = () => {
console.log('doActionsPendingInit', actionsPendingInit)
for (const fn of actionsPendingInit) fn();
actionsPendingInit = [];
};

View file

@ -484,7 +484,6 @@ function Ace2Inner(editorInfo, cssManagers) {
newText = `${lines.join('\n')}\n`;
}
window.console.log('importText', {text, undoable, dontProcess, newText})
inCallStackIfNecessary(`importText${undoable ? 'Undoable' : ''}`, () => {
setDocText(newText);
@ -526,7 +525,6 @@ function Ace2Inner(editorInfo, cssManagers) {
const oldLen = rep.lines.totalWidth();
const numLines = rep.lines.length();
window.console.log(rep, numLines - 1);
const upToLastLine = rep.lines.offsetOfIndex(numLines - 1);
const lastLineLength = rep.lines.atIndex(numLines - 1).text.length;
const assem = Changeset.smartOpAssembler();

View file

@ -191,7 +191,6 @@ const getDimensionOfFirstBrowserLineOfRepLine = (line: number, rep: RepModel) =>
};
const getSelectionRange = () => {
console.log("Selection is",window.frameElement)
if (!window.getSelection) {
return;
}

View file

@ -1,18 +1,18 @@
import html10n from '../js/vendors/html10n';
((document) => {
// Set language for l10n
let regexpLang: string | undefined;
let language = document.cookie.match(/language=((\w{2,3})(-\w+)?)/);
if (language) regexpLang = language[1];
// Set language for l10n
let regexpLang: string | undefined;
let language = document.cookie.match(/language=((\w{2,3})(-\w+)?)/);
if (language) regexpLang = language[1];
html10n.mt.bind('indexed', () => {
html10n.localize([regexpLang, navigator.language, 'en']);
});
html10n.mt.bind('indexed', () => {
console.log('Navigator language', navigator.language)
console.log('Localizing things', [regexpLang, navigator.language, 'en'])
html10n.localize([regexpLang, navigator.language, 'en']);
});
html10n.mt.bind('localized', () => {
document.documentElement.lang = html10n.getLanguage()!;
document.documentElement.dir = html10n.getDirection()!;
});
})(document);
html10n.mt.bind('localized', () => {
document.documentElement.lang = html10n.getLanguage()!;
document.documentElement.dir = html10n.getDirection()!;
});

View file

@ -139,6 +139,7 @@ const getParameters = [
name: 'lang',
checkVal: null,
callback: (val) => {
console.log('Val is', val)
html10n.localize([val, 'en']);
Cookies.set('language', val);
},

View file

@ -472,6 +472,7 @@ export class Html10n {
}
localize(langs: (string|undefined)[]|string) {
console.log('Available langs ', langs)
if ('string' === typeof langs) {
langs = [langs];
}
@ -549,6 +550,7 @@ export class Html10n {
break;
}
}
// @ts-ignore
if(lang != l) continue;
}