editor-js / editor-js/simple-image-tutorial

Loading saved images with stretched config doesn't work

Abierto
#2 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
29
Forks
22
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Try passing this object in the `data` field when the constructor is called with `const editor = new EditorJS({}))`

```json
{
"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?

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Reproduce el problema creando una instancia de EditorJS con el objeto de datos proporcionado y comprobando los bloques renderizados. Inspecciona cómo el bloque de imagen gestiona su configuración stretched y compárala con el párrafo que recibe la clase ce-block--stretched; se considera hecho cuando la imagen con stretched: true recibe el estilo stretched esperado sin afectar a otro bloque.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript
Área
frontend
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.