Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
sanity-plugin-latex-input
Advanced tools
> **NOTE** > > This is the **Sanity Studio v3 version** of sanity-plugin-latex-input. > > For the v2 version, please refer to the [v2-branch](https://github.com/sanity-io/latex-input).
NOTE
This is the Sanity Studio v3 version of sanity-plugin-latex-input.
For the v2 version, please refer to the v2-branch.
sanity-plugin-latex-input adds support for latex
schema type, so it can be used in Portable Text Editor (PTE) in Sanity Studio.
npm install --save sanity-plugin-latex-input@studio-v3
or
yarn add sanity-plugin-latex-input@studio-v3
Import and add the plugin to your studio config in sanity.config.ts (or .js):
import { latexBlock } from "sanity-plugin-latex-input";
export default createConfig({
/* ... */
plugins: [
latexInput()
]
})
You may now use the type name latex
in your schema, such as in portable text.
import React from 'react'
const mathInlineIcon = () => (
<span>
<span style={{ fontWeight: 'bold' }}>∑</span>b
</span>
)
const mathIcon = () => <span style={{ fontWeight: 'bold' }}>∑</span>
export default {
name: 'portableTextWithLatex',
type: 'array',
title: 'Body',
of: [
{
type: 'block',
title: 'Block',
of: [
{ type: 'latex', icon: mathInlineIcon, title: 'Inline math' },
],
},
{ type: 'latex', icon: mathIcon, title: 'Math block' },
],
}
The Portable Text editor will render a preview of the contents with KaTeX.
MIT-licensed. See LICENSE.
This plugin uses @sanity/plugin-kit with default configuration for build & watch scripts.
See Testing a plugin in Sanity Studio on how to run this plugin with hotreload in the studio.
Run "CI & Release" workflow. Make sure to select the v3 branch and check "Release new version".
Semantic release will only release on configured branches, so it is safe to run release on any branch.
FAQs
Latex input for Portable Text Editor in Sanity Studio V3.
We found that sanity-plugin-latex-input demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.