Ref https://github.com/webstudio-is/webstudio-designer/issues/400
- added superscript
- added subscript
- added clear formatting, used same trick as with span
- refactored interop to cover more options with less code
- convert newlines to linebreaks instead of paragraphs when convert
instances to lexical tree
Ref https://github.com/svg/svgo-components/tree/main/packages/svgo-jsx
Icons can be generated from .svg sources to react components. svgo-jsx
allows to do it easily.
Template reproduce existing components. Took 3 icons from material icons
though they do not have viewBox so added removeDimensions svgo plugin to
add it before predefined size (16) is added.
Ref https://github.com/webstudio-is/webstudio-designer/issues/400
- added span component to sdk
- added span support to text editor toolbar
Lexical has a great utility $patchStyleText which does exaactly what we
need, split selection into stylable element. Though there is a catch. It
requires to apply some styles. We do styling lazily and with clases so
it doesn't fit to trigger split. To workaroud it I instead patch with
css custom property which does not affect styling and considered a
trigger for lexical.
<img width="248" alt="image"
src="https://user-images.githubusercontent.com/5635476/201028529-0e5ec32e-a00a-43b0-899c-671f0edcad5b.png">
With previous docker setup I have a problem when switched between
projects had to setup migrations again and loose current session.
Docker compose volumes solve this problem and preserve current db state.
Can be destroyed with `docker compose down -v`.