ideas icon indicating copy to clipboard operation
ideas copied to clipboard

Bard Minimal Mode

Open lakkes-ra opened this issue 3 years ago • 6 comments
trafficstars

We often use bard as a wysiwyg editor for smaller text parts that sometimes even are just some words. As bard is a little »bulky« for one-liner, we added some custom css to make the bard field just as small as a normal text field.

Maybe it's an idea to add a option to have smaller, minimal bard?

lakkes-ra avatar Oct 27 '22 08:10 lakkes-ra

I had a similar idea a while back: https://github.com/statamic/ideas/issues/458

As Jack said, at the moment it's not really feasible. You can make the field look smaller, but it's tricky to actually restrict the content to a single line value.

But, I think it might be possible with Tiptap 2 (which is coming in Statamic 3.4). I was thinking about looking into an addon for this, once 3.4 is released.

jacksleight avatar Oct 27 '22 09:10 jacksleight

Thank you for the info, looking forward to TipTap 2!

Since you already posted the idea, I'll close this one again.

lakkes-ra avatar Oct 27 '22 09:10 lakkes-ra

Well, that one is closed, so you could leave this open 😊 .

jacksleight avatar Oct 27 '22 09:10 jacksleight

Turns out it's very possible with Tiptap 2:

https://user-images.githubusercontent.com/126740/198254414-a4a8353d-9a80-421b-b8f3-9706afc88320.mp4

Stores and outputs just inline text, no p node/element.

@jackmcdade Any interest in having this in core (for 3.4+)? Tiptap 2 makes the implementation pretty simple! Although I'm sure there are a bunch of things I haven't thought of. Some features would certainly need to be switched off in this mode.

jacksleight avatar Oct 27 '22 09:10 jacksleight

I don't see why not! That could be really nice to have.

jackmcdade avatar Oct 27 '22 11:10 jackmcdade

Awesome, I'll do a PR. 👍

jacksleight avatar Oct 27 '22 11:10 jacksleight

Added in https://github.com/statamic/cms/pull/6973.

jackmcdade avatar Mar 13 '23 22:03 jackmcdade