HTML और display
Saved सामग्री editor के बाहर और subscription के बिना पढ़ी जा सके।
Saved format
| Item | Saved HTML | क्या बचाएँ |
|---|---|---|
| Formula | <math data-latex="…">…</math> | पढ़ने के लिए MathML, re-edit के लिए data-latex। |
| Calculation / solution | div.conta-armada, tables, text, MathML | मौजूद हो तो JSON वाला data-conta; inline styles और structure। |
| Graph / drawing | PNG वाला <img> | src, alt, dimensions, data-grafico या data-quimica। |
| Chemical formula | <math data-quimica="…"> | MathML, LaTeX और configuration JSON। |
| CKEditor / Tiptap | span/div[data-formulix] | Wrappers और sanitized children; Tiptap में JSON भी संभव है। |
TinyMCE में edit करते समय .eqx[data-mathml] रहता है; save पर adapter portable MathML बनाता है। अस्थायी element को saved format न समझें। LaTeX data-latex में रहता है क्योंकि TinyMCE 8 sanitizer semantics/annotation हटाता है।
<math xmlns="http://www.w3.org/1998/Math/MathML" data-latex="x^2">
<msup><mi>x</mi><mn>2</mn></msup>
</math>विद्यार्थियों को दिखाना
Platform की सुरक्षित HTML handling से saved content render करें। Modern browsers MathML दिखाते हैं; tables और images पढ़ने के लिए Formulix नहीं चाहिए। Platform storage में PNG उपलब्ध रहने चाहिए। Metadata हटाने से appearance बच सकती है, पर re-edit रुक सकता है।
पुराने browsers के लिए project MathJax 3 सुझाता है। Files स्वयं host करें या MathJax 3 guide के अनुसार reader page पर यह component load करें। उदाहरण external CDN इस्तेमाल करता है; third-party resources के लिए CSP और privacy review करें।
<script defer
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js">
</script>Dynamic content जोड़ने पर MathJax ready होने के बाद MathJax.typesetPromise([element]) चलाएँ। विद्यार्थी की page पर Formulix load करना ज़रूरी नहीं।
Sanitization और accessibility
Explicit sanitizer rules में केवल आवश्यक elements और attributes बचाएँ। Untrusted HTML की sanitization बंद न करें। Save/reopen cycle में MathML, tables, styles और metadata जाँचें। Drupal alpha की Full HTML सीमा देखें।
Images का alternative text रखें। MathML assistive technologies में मदद करता है, लेकिन school के editor, browser और screen reader में परीक्षण फिर भी ज़रूरी है।