Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@tiptap/extension-hard-break
Advanced tools
@tiptap/extension-hard-break is an extension for the Tiptap editor that allows users to insert hard line breaks (similar to pressing Shift+Enter in a traditional text editor). This is useful for creating new lines within a paragraph without starting a new paragraph.
Insert Hard Break
This feature allows users to insert a hard break into the text. The code sample demonstrates how to import the HardBreak extension and use the setHardBreak command to insert a hard break at the current cursor position.
import { HardBreak } from '@tiptap/extension-hard-break';
const editor = new Editor({
extensions: [
HardBreak,
],
});
// Use the command to insert a hard break
editor.commands.setHardBreak();
Custom Key Bindings
This feature allows users to configure custom key bindings for inserting hard breaks. The code sample shows how to configure the HardBreak extension to insert a hard break when the user presses 'Mod-Enter' (Cmd-Enter on Mac or Ctrl-Enter on Windows).
import { HardBreak } from '@tiptap/extension-hard-break';
const editor = new Editor({
extensions: [
HardBreak.configure({
keymap: {
'Mod-Enter': () => editor.commands.setHardBreak(),
},
}),
],
});
The prosemirror-schema-basic package provides a basic schema for ProseMirror, including support for hard breaks. It is more general-purpose compared to @tiptap/extension-hard-break, which is specifically designed for Tiptap.
Draft.js is a rich text editor framework for React that includes support for hard breaks. While it offers similar functionality, it is a more comprehensive solution for building rich text editors and is not specifically tailored to 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
hard break extension for tiptap
The npm package @tiptap/extension-hard-break receives a total of 801,086 weekly downloads. As such, @tiptap/extension-hard-break popularity was classified as popular.
We found that @tiptap/extension-hard-break 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.