Components
Inline Equation Toolbar Button

Inline Equation Toolbar Button

A toolbar button for inserting and editing inline equations.

Installation

Install the following dependencies:

npm install @udecode/plate-math @radix-ui/react-toolbar @radix-ui/react-tooltip @radix-ui/react-separator

Copy and paste the following code into your project.

Get the code ->

Update the import paths to match your project setup.

Examples

Equation

Equation

  1. Equations allow you to express complex mathematical concepts in both inline and block formats.
  1. Key features:
  • LaTeX syntax support
  • Inline and block equation formats
  1. Inline equation example:
    
    (Einstein's famous equation)
  1. Block equation examples:

The quadratic formula for solving

.

The fundamental theorem of calculus.
  1. Try these actions:
  • Click on any equation to edit it. Press Escape to close the menu without editing it.
  • You can navigate through the equation by using the arrow keys
  • Use the slash command (/equation) to insert a new equation
  • Use the slash command (/inline equation) for inline equations
Advanced usage: Combine equations with other elements like tables or code blocks for comprehensive scientific documentation. For example:
The Schrödinger equation,

, is fundamental in quantum mechanics.
Experiment with different equation types and formatting to create rich, mathematical content in your documents.

Floating Toolbar

Floating Toolbar

The floating toolbar provides quick access to formatting options and actions for selected text.
How to use the floating toolbar:
  • Select any text to invoke the floating toolbar.
With the floating toolbar, you can:
  • Ask AI for assistance
  • Add a comment to the selected text
  • Transform the selected into an another block
  • Apply text formatting: bold, italic, underline, strikethrough, code
  • Mark text as an equation
  • Change text color or background color
  • Open the block menu for additional options
Try selecting some text below to see the floating toolbar in action:
Bold text, italic text, underlined text, and combined formatting.