besteadfast / carbon

Steadfast's starter project - Craft CMS, Vite, and DDEV
3 stars 2 forks source link

Suggestion: move to Vizy for all rich text needs #45

Open jakedohm opened 1 year ago

jakedohm commented 1 year ago

We currently use Redactor 🤮 for our Rich Text fields, and Vizy for complex text fields (that need non-text blocks). If we're going to leverage Vizy for most projects, I think it makes sense to build all of our Rich Text fields with it as well.

A couple reasons:

  1. The UI is nicer
  2. The config is simpler
  3. If we need to add blocks in the future, there's no migration needed (this is pretty likely to happen)
  4. It means we only have one system for all of our text needs, which makes learning and knowledge retention easier.

Questions:

btbunze commented 11 months ago

Note: Not a dealbreaker, but I noticed that Vizy v1.0.15 (on Kardia) has an issue where Vizy fields will wipe out their own data on first save attempt of an entry. Has anyone run into this on recent projects with newer versions of Vizy? I didn't see anything in the changelog about it, but I only did a quick scan.

jakedohm commented 11 months ago

@btbunze hmm def annoying. Since that's an old version, I'd assume it can be fixed by updating to the latest. Let's def try that and chat if that doesn't work.

btbunze commented 11 months ago

I went ahead and updated on Kardia, and it seems to be fixed.

btbunze commented 11 months ago

Putting this here so it's in writing, but another Vizy note: the current version sanitizes content modified in the html editor (both on save and on returning to the rich text editor). This means that we can't do things like <p class="text-primary-500">, which is a good default for sites where content is being modified by the client, but it's a drawback for clients like Alivecor who have us modify their content and expect things to be more flexible.

Another non-dealbreaker, and it seems to be in the works for version 2.2.0

DrewTJohnson commented 10 months ago

@btbunze for the flexibility, we could always extend the configuration to add buttons that aren't just blocks, like the custom paragraph button they show in the documentation: https://verbb.io/craft-plugins/vizy/docs/get-started/configuration#custom-buttons

btbunze commented 10 months ago

@DrewTJohnson Did you edit their docs while I wasn't looking? I totally missed the custom buttons section when I looked through them 😂

A couple things now that I know the option exists:

Thanks for the info!

DrewTJohnson commented 10 months ago

@btbunze I'm secretly a Vizy maintainer on the DL 😂

They have an example of a "kitchen sink" https://verbb.io/craft-plugins/vizy/docs/get-started/configuration#kitchen-sink

We could probably build off of that. For areas that need a specific tailwind class that the client won't change, we can also add the attributes to the renderHTML function: https://verbb.io/craft-plugins/vizy/docs/template-guides/modify-nodes#using-twig

I actually used Vizy exclusively on VB after we had the discussion about the move from Redactor and have spent a decent amount of time in the docs.

jakedohm commented 8 months ago

Next steps here:

btbunze commented 8 months ago

@jakedohm I started on this last Friday and have some example configs. Would love to quickly discuss this at some point this week to make sure we're all on the same page about what we're looking for for future projects

btbunze commented 8 months ago

Editor style note: #23