You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our app, we use the image plugin with the isInline: true setting. With this configuration, editing URLs through the floating media input does not work correctly; it updates (adds) the URL property of a parent node (p).
I worked around this issue by patching the submitFloatingMedia function. Instead of updating the selection, I update the element passed through the function parameter. This code works regardless of whether the image is an inline or a block node:
Maybe you should consider applying this code to upstream as it seems more reliable.
Reproduction URL
No response
Reproduction steps
1. Configure the image plugin to use inline images `createImagePlugin({isInline: true})`.
2. Paste an image to the editor.
3. Select the image and click "Edit url".
4. Edit the url and hit the "enter" key.
Result: the image does not get updated.
Expected result: the image should be updated with given url.
Plate version
34.0.0
Slate React version
0.103.0
Screenshots
No response
Logs
No response
Browsers
No response
Funding
You can sponsor this specific effort via a Polar.sh pledge below
We receive the pledge once the issue is completed & verified
The text was updated successfully, but these errors were encountered:
Description
In our app, we use the image plugin with the
isInline: true
setting. With this configuration, editing URLs through the floating media input does not work correctly; it updates (adds) the URL property of a parent node (p
).I worked around this issue by patching the
submitFloatingMedia
function. Instead of updating the selection, I update the element passed through the function parameter. This code works regardless of whether the image is an inline or a block node:Maybe you should consider applying this code to upstream as it seems more reliable.
Reproduction URL
No response
Reproduction steps
Plate version
34.0.0
Slate React version
0.103.0
Screenshots
No response
Logs
No response
Browsers
No response
Funding
The text was updated successfully, but these errors were encountered: