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' loader: 'js'
}, },
alias:{ 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 bundle: true, // Bundle the files together
minify: process.env.NODE_ENV === "production", // Minify the output minify: process.env.NODE_ENV === "production", // Minify the output
@ -212,7 +213,8 @@ const convertTypescriptWatched = (content: string, cb: (output:string, hash: str
loader: 'js' loader: 'js'
}, },
alias:{ 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 bundle: true, // Bundle the files together
minify: process.env.NODE_ENV === "production", // Minify the output minify: process.env.NODE_ENV === "production", // Minify the output

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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