From b023bbdea8d761429915385b64409c7aa7a5ded7 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 2 Apr 2026 08:33:40 +0000
Subject: [PATCH 1/2] Implement math formula tool with KaTeX rendering
- Enable the mathsTool button (remove disabled class)
- Add KaTeX CSS/JS via CDN for LaTeX formula rendering
- Add modal dialog with live preview for entering LaTeX formulas
- Add tool=4 handler for mathsTool in tool switch
- Add case 4 in addElement() to show modal on canvas click
- Insert rendered formula as draggable element on the whiteboard
- Support Enter key to insert and cancel to reset state
- Update welcome modal text to mention math formulas
Agent-Logs-Url: https://github.com/ionutfinta/WhiteboardJS/sessions/eaf4b9ab-bbf0-4902-93a5-f99bada3a018
Co-authored-by: ionutfinta <56076718+ionutfinta@users.noreply.github.com>
---
src/index.html | 34 ++++++++++++++++--
src/jquery.whiteboard.js | 74 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 106 insertions(+), 2 deletions(-)
diff --git a/src/index.html b/src/index.html
index 0737e46..93358e2 100644
--- a/src/index.html
+++ b/src/index.html
@@ -9,6 +9,7 @@
+
@@ -44,7 +45,7 @@
-