🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

mathml-to-clipboard

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mathml-to-clipboard

A copy event handler for a web application that transforms MathML into AsciiMath and places it into the clipboard.

1.0.4
latest
Source
npm
Version published
Weekly downloads
0
-100%
Maintainers
0
Weekly downloads
 
Created
Source

A JavaScript code to transform MathML into AsciiMath during "copy" and "dragstart" events. See example.html.

This allows the user to select a part of the rendered MathML on a page, then copy and paste the selection or use drag-and-drop. The selection is serialized to a plain text string as AsciiMath.

The script only handles MathML tags, so MathJax may not always be supported. It works with MathML polyfills, such as https://github.com/fred-wang/mathml.css/ .

Usage:

npm install Yaffle/mathml-to-clipboard
npm run-script build

Then add the script to your html page:

<script src="dist/main.js"></script>

It will set the "copy" and "dragstart" event handlers on the document.

Keywords

mathml

FAQs

Package last updated on 06 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts