numbas / numbas/editor

Show a warning when a content area contains pasted MathJax output

Open
#762 1 comment 0 reactions 0 assignees View on GitHub
interface to be aware of
Dominant language
JavaScript
Stars
60
Forks
62
PR merge metrics
No merged PRs in 30d

Description

MathJax uses `id` attributes on its output to identify expressions that it's typesetting, with a counter that increments from 0 after the page loads.
So if you paste output from a previous run into a content area, MathJax will eventually get to the same `id` attribute as it processes TeX in the page, and throw an error when it finds the pasted element instead of the one it's just created.

The editor should detect elements with MathJax attributes, starting with `MathJax-`, and show a warning.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the editor's content-area paste handling and its MathJax integration. Check how pasted elements are inspected, then make the completed behavior show a warning whenever an element has an attribute beginning with `MathJax-`, preventing the pasted output from causing a later MathJax identifier conflict.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.