';
+ applyTranslations();
+
+ resultContainer.style.display = 'none';
+ recognizeButton.style.display = 'none';
+ clearButton.style.display = 'none';
+ errorContainer.style.display = 'none';
+
+ dropZone.style.display = 'flex';
+ fileInput.value = '';
+ }
+
+ // Default to only select latex and text
+ outputFormatCheckboxes.forEach((checkbox) => {
+ checkbox.checked = checkbox.value === 'latex' || checkbox.value === 'text';
+ });
+
+ // Add checkbox change event listener
+ outputFormatCheckboxes.forEach(checkbox => {
+ checkbox.addEventListener('change', () => {
+ // If there are displayed results, update all result format selectors
+ const resultBoxes = document.querySelectorAll('.result-box');
+ resultBoxes.forEach((box, index) => {
+ const formatSelector = box.querySelector('.formatSelector');
+ const currentValue = formatSelector.value;
+
+ // Rebuild options
+ formatSelector.innerHTML = Array.from(outputFormatCheckboxes)
+ .filter(checkbox => checkbox.checked)
+ .map(checkbox => ``)
+ .join('');
+
+ // If the previously selected format is still available, keep it selected
+ if (Array.from(formatSelector.options).some(option => option.value === currentValue)) {
+ formatSelector.value = currentValue;
+ }
+
+ // Update displayed code
+ updateCodeDisplay(index);
+ });
+ });
+ });
+
+})();
\ No newline at end of file
diff --git a/sdkjs-plugins/content/mathpix/translations/de-DE.json b/sdkjs-plugins/content/mathpix/translations/de-DE.json
new file mode 100644
index 00000000..0f9585ed
--- /dev/null
+++ b/sdkjs-plugins/content/mathpix/translations/de-DE.json
@@ -0,0 +1,22 @@
+{
+ "Click to upload": "Zum Hochladen klicken",
+ "Results": "Ergebnisse",
+ "Configuration": "Konfiguration",
+ "Mathpix App ID:": "Mathpix App-ID:",
+ "Mathpix APP Key:": "Mathpix APP-Schlüssel:",
+ "Enter your App ID": "Geben Sie Ihre App-ID ein",
+ "Enter your APP Key": "Geben Sie Ihren APP-Schlüssel ein",
+ "Save Credentials": "Anmeldedaten speichern",
+ "Don't have an API key?": "Sie haben noch keinen API-Schlüssel?",
+ "Register here": "Hier registrieren",
+ "Output Formats:": "Ausgabeformate:",
+ "Recognize": "Erkennen",
+ "Clear": "Löschen",
+ "Copy": "Kopieren",
+ "Insert": "Einfügen",
+ "Image": "Bild",
+ "No preview available": "Keine Vorschau verfügbar",
+ "Credentials saved!": "Anmeldedaten gespeichert!",
+ "Please enter both your Mathpix App ID and APP Key in the configuration panel.": "Bitte geben Sie sowohl Ihre Mathpix App-ID als auch den APP-Schlüssel im Konfigurationsbereich ein.",
+ "Note: Some advanced LaTeX syntax may not be compatible with Document Editor. Manual adjustment might be needed.": "Hinweis: Einige erweiterte LaTeX-Syntax ist möglicherweise nicht mit dem Dokumenten-Editor kompatibel. Manuelle Anpassung könnte erforderlich sein."
+}
\ No newline at end of file
diff --git a/sdkjs-plugins/content/mathpix/translations/es-ES.json b/sdkjs-plugins/content/mathpix/translations/es-ES.json
new file mode 100644
index 00000000..e76f3f93
--- /dev/null
+++ b/sdkjs-plugins/content/mathpix/translations/es-ES.json
@@ -0,0 +1,22 @@
+{
+ "Click to upload": "Haga clic para cargar",
+ "Results": "Resultados",
+ "Configuration": "Configuración",
+ "Mathpix App ID:": "ID de la aplicación Mathpix:",
+ "Mathpix APP Key:": "Clave APP de Mathpix:",
+ "Enter your App ID": "Ingrese su ID de aplicación",
+ "Enter your APP Key": "Ingrese su clave APP",
+ "Save Credentials": "Guardar credenciales",
+ "Don't have an API key?": "¿No tiene una clave API?",
+ "Register here": "Regístrese aquí",
+ "Output Formats:": "Formatos de salida:",
+ "Recognize": "Reconocer",
+ "Clear": "Limpiar",
+ "Copy": "Copiar",
+ "Insert": "Insertar",
+ "Image": "Imagen",
+ "No preview available": "Vista previa no disponible",
+ "Credentials saved!": "¡Credenciales guardadas!",
+ "Please enter both your Mathpix App ID and APP Key in the configuration panel.": "Por favor, ingrese tanto su ID de aplicación Mathpix como su clave APP en el panel de configuración.",
+ "Note: Some advanced LaTeX syntax may not be compatible with Document Editor. Manual adjustment might be needed.": "Nota: Algunas sintaxis LaTeX avanzadas pueden no ser compatibles con el Editor de documentos. Puede ser necesario un ajuste manual."
+}
\ No newline at end of file
diff --git a/sdkjs-plugins/content/mathpix/translations/fr-FR.json b/sdkjs-plugins/content/mathpix/translations/fr-FR.json
new file mode 100644
index 00000000..1975fed8
--- /dev/null
+++ b/sdkjs-plugins/content/mathpix/translations/fr-FR.json
@@ -0,0 +1,22 @@
+{
+ "Click to upload": "Cliquez pour télécharger",
+ "Results": "Résultats",
+ "Configuration": "Configuration",
+ "Mathpix App ID:": "ID d'application Mathpix :",
+ "Mathpix APP Key:": "Clé APP Mathpix :",
+ "Enter your App ID": "Entrez votre ID d'application",
+ "Enter your APP Key": "Entrez votre clé APP",
+ "Save Credentials": "Enregistrer les identifiants",
+ "Don't have an API key?": "Vous n'avez pas de clé API ?",
+ "Register here": "Inscrivez-vous ici",
+ "Output Formats:": "Formats de sortie :",
+ "Recognize": "Reconnaître",
+ "Clear": "Effacer",
+ "Copy": "Copier",
+ "Insert": "Insérer",
+ "Image": "Image",
+ "No preview available": "Aucun aperçu disponible",
+ "Credentials saved!": "Identifiants enregistrés !",
+ "Please enter both your Mathpix App ID and APP Key in the configuration panel.": "Veuillez saisir votre ID d'application Mathpix et votre clé APP dans le panneau de configuration.",
+ "Note: Some advanced LaTeX syntax may not be compatible with Document Editor. Manual adjustment might be needed.": "Remarque : Certaines syntaxes LaTeX avancées peuvent ne pas être compatibles avec l'Éditeur de documents. Un ajustement manuel peut être nécessaire."
+}
\ No newline at end of file
diff --git a/sdkjs-plugins/content/mathpix/translations/langs.json b/sdkjs-plugins/content/mathpix/translations/langs.json
new file mode 100644
index 00000000..d714e840
--- /dev/null
+++ b/sdkjs-plugins/content/mathpix/translations/langs.json
@@ -0,0 +1,8 @@
+[
+ "ru-RU",
+ "de-DE",
+ "fr-FR",
+ "es-ES",
+ "pt-BR",
+ "zh-CN"
+]
\ No newline at end of file
diff --git a/sdkjs-plugins/content/mathpix/translations/pt-BR.json b/sdkjs-plugins/content/mathpix/translations/pt-BR.json
new file mode 100644
index 00000000..48000d66
--- /dev/null
+++ b/sdkjs-plugins/content/mathpix/translations/pt-BR.json
@@ -0,0 +1,22 @@
+{
+ "Click to upload": "Clique para fazer upload",
+ "Results": "Resultados",
+ "Configuration": "Configuração",
+ "Mathpix App ID:": "ID do aplicativo Mathpix:",
+ "Mathpix APP Key:": "Chave do aplicativo Mathpix:",
+ "Enter your App ID": "Digite seu ID do aplicativo",
+ "Enter your APP Key": "Digite sua chave do aplicativo",
+ "Save Credentials": "Salvar credenciais",
+ "Don't have an API key?": "Não tem uma chave API?",
+ "Register here": "Registre-se aqui",
+ "Output Formats:": "Formatos de saída:",
+ "Recognize": "Reconhecer",
+ "Clear": "Limpar",
+ "Copy": "Copiar",
+ "Insert": "Inserir",
+ "Image": "Imagem",
+ "No preview available": "Nenhuma prévia disponível",
+ "Credentials saved!": "Credenciais salvas!",
+ "Please enter both your Mathpix App ID and APP Key in the configuration panel.": "Por favor, insira seu ID do aplicativo Mathpix e a Chave APP no painel de configuração.",
+ "Note: Some advanced LaTeX syntax may not be compatible with Document Editor. Manual adjustment might be needed.": "Nota: Algumas sintaxes LaTeX avançadas podem não ser compatíveis com o Editor de Documentos. Pode ser necessário ajuste manual."
+}
\ No newline at end of file
diff --git a/sdkjs-plugins/content/mathpix/translations/ru-RU.json b/sdkjs-plugins/content/mathpix/translations/ru-RU.json
new file mode 100644
index 00000000..d2317c62
--- /dev/null
+++ b/sdkjs-plugins/content/mathpix/translations/ru-RU.json
@@ -0,0 +1,22 @@
+{
+ "Click to upload": "Нажмите для загрузки",
+ "Results": "Результаты",
+ "Configuration": "Конфигурация",
+ "Mathpix App ID:": "ID приложения Mathpix:",
+ "Mathpix APP Key:": "Ключ приложения Mathpix:",
+ "Enter your App ID": "Введите ID приложения",
+ "Enter your APP Key": "Введите ключ приложения",
+ "Save Credentials": "Сохранить учетные данные",
+ "Don't have an API key?": "Нет ключа API?",
+ "Register here": "Зарегистрируйтесь здесь",
+ "Output Formats:": "Форматы вывода:",
+ "Recognize": "Распознать",
+ "Clear": "Очистить",
+ "Copy": "Копировать",
+ "Insert": "Вставить",
+ "Image": "Изображение",
+ "No preview available": "Предпросмотр недоступен",
+ "Credentials saved!": "Учетные данные сохранены!",
+ "Please enter both your Mathpix App ID and APP Key in the configuration panel.": "Пожалуйста, введите ID приложения Mathpix и ключ приложения в панели конфигурации.",
+ "Note: Some advanced LaTeX syntax may not be compatible with Document Editor. Manual adjustment might be needed.": "Примечание: Некоторые расширенные синтаксисы LaTeX могут быть несовместимы с Редактором документов. Может потребоваться ручная настройка."
+}
\ No newline at end of file
diff --git a/sdkjs-plugins/content/mathpix/translations/zh-CN.json b/sdkjs-plugins/content/mathpix/translations/zh-CN.json
new file mode 100644
index 00000000..13d608b4
--- /dev/null
+++ b/sdkjs-plugins/content/mathpix/translations/zh-CN.json
@@ -0,0 +1,22 @@
+{
+ "Click to upload": "点击上传",
+ "Results": "结果",
+ "Configuration": "配置",
+ "Mathpix App ID:": "Mathpix 应用 ID:",
+ "Mathpix APP Key:": "Mathpix 应用密钥:",
+ "Enter your App ID": "请输入应用 ID",
+ "Enter your APP Key": "请输入应用密钥",
+ "Save Credentials": "保存凭据",
+ "Don't have an API key?": "没有 API 密钥?",
+ "Register here": "在此注册",
+ "Output Formats:": "输出格式:",
+ "Recognize": "识别",
+ "Clear": "清除",
+ "Copy": "复制",
+ "Insert": "插入",
+ "Image": "图片",
+ "No preview available": "预览不可用",
+ "Credentials saved!": "凭据已保存!",
+ "Please enter both your Mathpix App ID and APP Key in the configuration panel.": "请在配置面板中输入您的 Mathpix 应用 ID 和应用密钥。",
+ "Note: Some advanced LaTeX syntax may not be compatible with Document Editor. Manual adjustment might be needed.": "注意:某些高级 LaTeX 语法可能与文档编辑器不兼容。可能需要手动调整。"
+}
\ No newline at end of file
diff --git a/store/config.json b/store/config.json
index c77a7478..a0a8e573 100644
--- a/store/config.json
+++ b/store/config.json
@@ -35,5 +35,6 @@
{ "name": "onlydraw", "discussion": "" },
{ "name": "pomodoro", "discussion": "" },
{ "name": "videoembedder", "discussion": "" },
- { "name": "mathtype", "discussion": "" }
+ { "name": "mathtype", "discussion": "" },
+ { "name": "mathpix", "discussion": "" }
]