editor-js / editor-js/simple-image-tutorial
Loading saved images with stretched config doesn't work
- 主要言語
- JavaScript
- スター
- 29
- フォーク
- 22
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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?
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
提供されたデータオブジェクトを使ってEditorJSインスタンスを作成し、レンダリングされたブロックを確認して問題を再現します。画像ブロックがstretched設定をどのように処理するかを調べ、ce-block--stretchedクラスを受け取る段落と比較します; stretched: trueの画像が期待されるstretchedスタイルを受け取り、別のブロックに影響しなければ完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100