mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-04 14:19:13 -04:00
Fixed loading ep_font_color3
This commit is contained in:
parent
ccbbaa20b3
commit
b0a93ccddb
7 changed files with 20 additions and 19 deletions
|
@ -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
|
||||
|
|
|
@ -100,7 +100,6 @@ const Ace2Editor = function () {
|
|||
};
|
||||
|
||||
const doActionsPendingInit = () => {
|
||||
console.log('doActionsPendingInit', actionsPendingInit)
|
||||
for (const fn of actionsPendingInit) fn();
|
||||
actionsPendingInit = [];
|
||||
};
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -191,7 +191,6 @@ const getDimensionOfFirstBrowserLineOfRepLine = (line: number, rep: RepModel) =>
|
|||
};
|
||||
|
||||
const getSelectionRange = () => {
|
||||
console.log("Selection is",window.frameElement)
|
||||
if (!window.getSelection) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -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()!;
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
},
|
||||
|
|
2
src/static/js/vendors/html10n.ts
vendored
2
src/static/js/vendors/html10n.ts
vendored
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue