Skip to content

Commit 3e9737d

Browse files
yisonlijxlwqq
authored andcommitted
修复初始化显示时html尾标签丢失问题
1 parent 56b0f22 commit 3e9737d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Editor.php

+3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ public function render()
2626

2727
if (!is_string($json)) {
2828
$json = json_encode($json);
29+
} else {
30+
$json = json_encode(json_decode($json,true)); //兼容json里有类似</p>格式,首次初始化显示会丢失的问题
2931
}
32+
$this->value = $json;
3033

3134
$options = json_encode(config('admin.extensions.json-editor.config'));
3235

0 commit comments

Comments
 (0)