Loading saved images with stretched config doesn't work
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- frontend
Research direction
Reproduce the issue by creating an EditorJS instance with the supplied data object and checking the rendered blocks. Inspect how the image block handles its stretched setting and compare it with the paragraph receiving the ce-block--stretched class; done means the image with stretched: true receives the expected stretched styling without affecting another block.
Written by the indexing model from the issue text.
Description
Try passing this object in the data field when the constructor is called with const editor = new EditorJS({}))
{
"time": 1600668389224,
"blocks": [
{
"type": "image",
"data": {
"url": "https://cdn.pixabay.com/photo/2017/09/01/21/53/blue-2705642_1280.jpg",
"caption": "Here is a caption field",
"withBorder": false,
"withBackground": true,
"stretched": false
}
},
{
"type": "paragraph",
"data": {
"text": "hellow orld"
}
},
{
"type": "paragraph",
"data": {
"text": "hello world"
}
},
{
"type": "image",
"data": {
"url": "https://cdn.pixabay.com/photo/2017/09/01/21/53/blue-2705642_1280.jpg",
"caption": "adsad",
"withBorder": false,
"withBackground": false,
"stretched": true
}
}
],
"version": "2.18.0"
}
The third block, i.e. paragraph ' hello world ' will get the ce-block--stretched class applied to it and the image below it won't.
But, the settings icon for stretched is toggled. Other settings work fine.
What's the issue?
- Dominant language
- JavaScript
- Stars
- 29
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from editor-js/simple-image-tutorial
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
editor-js/simple-image-tutorial#4 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
All issues in editor-js/simple-image-tutorial
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
mksglu/context-mode#1200 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
neondatabase/website#5944 ·
-
module: core
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
bigbluebutton/bigbluebutton#25849 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
jaegertracing/jaeger-ui#4506 ·