ui: remove emojify.js

This commit is contained in:
undefined committed 2021-10-10 16:27:23 +08:00
1 parent 84c38cb571
commit 5f527658f8
27 files changed
+57 -138

No files matched your search

@@ -0,0 +1,21 @@
import { AutoloadPage } from 'vj/misc/Page';
import delay from 'vj/utils/delay';
import CmEditor from '.';
function runSubstitute($container: JQuery<Document | HTMLElement>) {
for (const language of ['markdown', 'yaml', 'json', 'plain']) {
$container.find(`textarea[data-${language}]`).get().forEach((element) => {
CmEditor.getOrConstruct($(element), { language });
});
}
}
const cmEditorPage = new AutoloadPage('cmEditorPage', () => {
runSubstitute($('body'));
$(document).on('vjContentNew', async (e) => {
await delay(0);
runSubstitute($(e.target));
});
});
export default cmEditorPage;