Bogdan Chadkin
|
59b6471c4f
|
experimental: support paste html (#5185)
Ref https://github.com/webstudio-is/webstudio/issues/4404
Slightly reworked paste story. Now minimal API to insert html looks like
this
```js
const fragment = generateFragmentFromHtml(html);
insertWebstudioFragmentAt(fragment);
```
- attributes are casted to string, number and boolean types
- text is wrapped with spans when outside of rich text
- unsupported tags are ignored in result
https://github.com/user-attachments/assets/c8072d86-72bd-4446-a26a-e678b193f93e
|
2025-05-06 13:31:13 +04:00 |
|