Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
@tiptap/extension-strike
Advanced tools
@tiptap/extension-strike is an extension for the Tiptap editor that provides functionality for strikethrough text formatting. It allows users to apply and remove strikethrough styling to selected text within the editor.
Add Strikethrough Formatting
This code demonstrates how to add the strikethrough extension to a Tiptap editor instance. The content includes an example of text with strikethrough formatting.
import { Strike } from '@tiptap/extension-strike';
import { Editor } from '@tiptap/core';
const editor = new Editor({
extensions: [
Strike,
],
content: '<p>This is a <s>strikethrough</s> example.</p>',
});
Toggle Strikethrough Formatting
This code shows how to toggle strikethrough formatting on the selected text in the editor. If the selected text already has strikethrough, it will be removed; otherwise, it will be applied.
editor.chain().focus().toggleStrike().run();
The prosemirror-schema-basic package provides a basic schema for ProseMirror, including support for strikethrough formatting. It is more low-level compared to @tiptap/extension-strike and requires more setup to integrate with an editor.
Quill is a rich text editor that includes built-in support for strikethrough formatting. It offers a more comprehensive set of features out of the box compared to @tiptap/extension-strike, which is a more focused extension for Tiptap.
Tiptap is a headless wrapper around ProseMirror – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as New York Times, The Guardian or Atlassian.
Documentation can be found on the Tiptap website.
Tiptap is open sourced software licensed under the MIT license.
FAQs
strike extension for tiptap
The npm package @tiptap/extension-strike receives a total of 584,565 weekly downloads. As such, @tiptap/extension-strike popularity was classified as popular.
We found that @tiptap/extension-strike demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.