anki/ts/editor/base.ts
Henrik Giesel 478b3a53f1
Remove individual .html files + other refactorings (#1588)
* Move some AddCards specific code to NoteCreator.svelte

* Add new strings for Toggling the Visual / HTML editor

* Set LabelContainer vertical-align to text-top

- Makes them look more centered

* Remove appendInParentheses helper

* Make all ts/*.html files include only module.js and module.css

* Move any JS from .html to index files

* Remove .html files from ts modules

* Remove Python with Starlark implemenation

* Remove reference to non-existing file

* Remove deck-option.html as well

* fix change-notetype screen (dae)
2022-01-16 15:05:35 +10:00

50 lines
1.3 KiB
TypeScript

// Copyright: Ankitects Pty Ltd and contributors
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
/**
* Code that is shared among all entry points in /ts/editor
*/
import "./legacy.css";
import "./editor-base.css";
import "../lib/register-package";
import "../sveltelib/export-runtime";
declare global {
interface Selection {
modify(s: string, t: string, u: string): void;
addRange(r: Range): void;
removeAllRanges(): void;
getRangeAt(n: number): Range;
}
}
import { ModuleName } from "../lib/i18n";
export const editorModules = [
ModuleName.EDITING,
ModuleName.KEYBOARD,
ModuleName.ACTIONS,
ModuleName.BROWSING,
];
export { editorToolbar } from "./EditorToolbar.svelte";
import IconButton from "../components/IconButton.svelte";
import LabelButton from "../components/LabelButton.svelte";
import WithShortcut from "../components/WithShortcut.svelte";
import WithContext from "../components/WithContext.svelte";
import WithState from "../components/WithState.svelte";
import * as contextKeys from "../components/context-keys";
import * as editorContextKeys from "./NoteEditor.svelte";
export const components = {
IconButton,
LabelButton,
WithShortcut,
WithContext,
WithState,
contextKeys: { ...contextKeys, ...editorContextKeys },
};