collective / volto-hydra

A volto addon to let you edit content in realtime when you have many frontends written in any framework
0 stars 2 forks source link

I can Format text on a text block using formatting on quanta toolbar (e.g. bold) #32

Closed MAX-786 closed 1 week ago

MAX-786 commented 3 months ago

Tasks

Edge cases

djay commented 2 weeks ago

@MAX-786 I think the extra code you are looking for on how it's done now is in https://6.docs.plone.org/volto/configuration/volto-slate/api.html. There is a whole plugin system that later will need to be supported perhaps. The default styles are in https://github.com/plone/volto/tree/main/packages/volto-slate/src/editor/plugins/StyleMenu I haven't looking if there is anyway to use this code without changing the definition of a slate plugin but I guess not?

djay commented 2 weeks ago

@MAX-786 the code you want for the transforms is in https://github.com/ianstormtaylor/slate/blob/2c9d5ec87fddf447794a563356bfd729235888a4/docs/api/transforms.md?plain=1 I suspect this you can use in hyrda.js. Still not sure thats the right place to do it though