Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add createParagraphEnd command #438

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

rfgamaral
Copy link
Member

@rfgamaral rfgamaral commented Sep 12, 2023

Overview

Adds a new command, createParagraphEnd, which creates an empty paragraph always at the end of the document.

This command that can be invoked like this:

  • editor.chain().focus().createParagraphEnd().run()

This is just a helpful command that doesn't come built-in with Tiptap.

PR Checklist

Test plan

  • Open the preview Storybook deployed to Netlify
  • Open the Rich-text → Functions → Commands story
  • Type a multiline document (or copy and paste something)
  • Place the text cursor in multiple locations, and in between press the createParagraphEnd button
    • Observe that regardless of the text cursor position, an empty paragraph is always created at the end of the document
  • Open the Plain-text → Functions → Commands story
  • Type a multiline document (or copy and paste something)
  • Place the text cursor in multiple locations, and in between press the createParagraphEnd button
    • Observe that regardless of the text cursor position, an empty paragraph is always created at the end of the document

@rfgamaral rfgamaral added the 👀 Show PR Used for PRs that need a review, but can be merged when CI is green. label Sep 12, 2023
@rfgamaral rfgamaral requested a review from a team September 12, 2023 09:25
@rfgamaral rfgamaral self-assigned this Sep 12, 2023
@rfgamaral rfgamaral requested review from nats12 and removed request for a team September 12, 2023 09:26
@netlify
Copy link

netlify bot commented Sep 12, 2023

Deploy Preview for doist-typist ready!

Name Link
🔨 Latest commit 75a31a1
🔍 Latest deploy log https://app.netlify.com/sites/doist-typist/deploys/65002f5cce2ed10008885104
😎 Deploy Preview https://deploy-preview-438--doist-typist.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@rfgamaral rfgamaral force-pushed the ricardo/create-empty-paragraph-end branch from 13d51ac to 75a31a1 Compare September 12, 2023 09:28
@rfgamaral rfgamaral changed the title feat: Add createEmptyParagraphEnd command feat: Add createParagraphEnd command Sep 12, 2023
@rfgamaral rfgamaral merged commit 28484aa into main Sep 12, 2023
11 checks passed
@rfgamaral rfgamaral deleted the ricardo/create-empty-paragraph-end branch September 12, 2023 09:48
doistbot added a commit that referenced this pull request Sep 12, 2023
## [1.5.0](v1.4.12...v1.5.0) (2023-09-12)

### Features

* Add `createParagraphEnd` command ([#438](#438)) ([28484aa](28484aa))
@doistbot
Copy link
Member

🎉 This PR is included in version 1.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@doistbot doistbot added the released Pull requests that have been released to production label Sep 12, 2023
doistbot added a commit that referenced this pull request Sep 12, 2023
## [1.5.0](v1.4.12...v1.5.0) (2023-09-12)

### Features

* Add `createParagraphEnd` command ([#438](#438)) ([28484aa](28484aa))
@frankieyan
Copy link
Member

Do we have a use case for this command?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Pull requests that have been released to production 👀 Show PR Used for PRs that need a review, but can be merged when CI is green.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants