statamic / ideas

💡Discussions on ideas and feature requests for Statamic
https://statamic.dev
32 stars 1 forks source link

Bard Minimal Mode #893

Closed lakkes-ra closed 1 year ago

lakkes-ra commented 1 year ago

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?

jacksleight commented 1 year ago

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.

lakkes-ra commented 1 year ago

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

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

jacksleight commented 1 year ago

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

jacksleight commented 1 year ago

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.

jackmcdade commented 1 year ago

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

jacksleight commented 1 year ago

Awesome, I'll do a PR. 👍

jackmcdade commented 1 year ago

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