tiptap/packages/extension-hard-break
Glenn Allen 2178118991
Some checks are pending
build / lint (20) (push) Waiting to run
build / test (20, map[name:Demos/Examples spec:./demos/src/Examples/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Experiments spec:./demos/src/Experiments/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Extensions spec:./demos/src/Extensions/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/GuideContent spec:./demos/src/GuideContent/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/GuideGettingStarted spec:./demos/src/GuideGettingStarted/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Marks spec:./demos/src/Marks/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Nodes spec:./demos/src/Nodes/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Integration spec:./tests/cypress/integration/**/*.spec.{js,ts}]) (push) Waiting to run
build / build (20) (push) Blocked by required conditions
Publish / Release (20) (push) Waiting to run
feat: add Node linebreakReplacement support and enable on hardBreak nodes (#5821)
* Support the Node linebreakReplacement property

Support the [linebreakReplacement](https://prosemirror.net/docs/ref/#model.NodeSpec.linebreakReplacement) property on Nodes, allowing a node to be used wherever a newline character is, when converting between blocks that don't support the linebreak node, but have their whitespace set to "pre".

This is useful, for example, when converting between code blocks & normal paragraphs. Code blocks don't support the linebreak node, but do allow newline characters ('\n').
Marking the `hardBreak` node as the `linebreakReplacement` will mean the newline characters within codeBlock nodes will be converted to `hardBreak` nodes in the paragraph.

* Make hardBreak the default linebreakReplacement node

When converting between codeBlocks and normal paragraphs, the hardBreak node should be used in place of newline '\n' characters.
2024-11-11 09:05:32 +01:00
..
src feat: add Node linebreakReplacement support and enable on hardBreak nodes (#5821) 2024-11-11 09:05:32 +01:00
CHANGELOG.md chore(release): release version 2.9.1 (#5757) 2024-10-23 11:20:21 +02:00
package.json chore(release): release version 2.9.1 (#5757) 2024-10-23 11:20:21 +02:00
README.md docs: consistent naming (#3882) 2023-03-27 11:20:31 +02:00
rollup.config.js Shared rollup config (#5403) 2024-07-27 12:46:39 +02:00

@tiptap/extension-hard-break

Version Downloads License Sponsor

Introduction

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.

Official Documentation

Documentation can be found on the Tiptap website.

License

Tiptap is open sourced software licensed under the MIT license.