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

Add placeholder and character_limit support to Bard #6449

Merged
merged 5 commits into from Aug 9, 2022

Conversation

jacksleight
Copy link
Contributor

This PR adds placeholder and character_limit support to Bard by implementing the official Tiptap 2 Placeholder and CharacterCount extensions:

https://tiptap.dev/api/extensions/placeholder
https://tiptap.dev/api/extensions/character-count

The placeholder CSS is taken from the Tiptap docs.

This PR is for Bard 2 / TipTap 2 and targets the master branch.

Closes statamic/ideas#826

@jasonvarga
Copy link
Member

Nice ones. I've added the character count to the field like you'd see in the text fieldtype.

CleanShot 2022-08-09 at 15 24 19

@jasonvarga jasonvarga merged commit 5dce3ff into statamic:master Aug 9, 2022
@jacksleight
Copy link
Contributor Author

Oh nice!

@jacksleight jacksleight deleted the bard-limit-placeholder branch August 9, 2022 20:00
@j3ll3yfi5h
Copy link
Contributor

Hi @jacksleight! Thanks for your PR to make this feature available🙏🏻

How can I enable the character counter? Am I right, that this is not possible with e.g. character_limit: '1000' like on the textarea field?

@jacksleight
Copy link
Contributor Author

jacksleight commented Sep 12, 2022

Hey, this is only on the master branch at the moment, it hasn't been released yet. It requires Bard 2/TipTap 2 so will be part of Statamic 3.4.

@j3ll3yfi5h
Copy link
Contributor

Oh, ok! Thanks for the clarification!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants