fix: remove required attribute from gist source textareas and fix emoji-picker script type

This commit is contained in:
2026-05-16 01:10:55 +00:00
parent ed8d8b3ac1
commit 299d0602f1
5 changed files with 12 additions and 12 deletions
+4 -3
View File
@@ -1,17 +1,18 @@
class GistEditor {
constructor(textareaId, langSelectId) {
this.editor = null;
this.initialized = false;
this.textareaId = textareaId || "gist-source-editor";
this.langSelectId = langSelectId || "gist-language";
this.init();
}
init() {
if (this.initialized) return;
if (typeof CodeMirror === "undefined") return;
const textarea = document.getElementById(this.textareaId);
if (!textarea || textarea.dataset.cminit) return;
textarea.dataset.cminit = "1";
if (!textarea) return;
this.initialized = true;
this.editor = CodeMirror.fromTextArea(textarea, {
lineNumbers: true,