Skip to content

Commit 6c5c2c8

Browse files
summerwayjxlwqq
authored andcommitted
[fix] 表单内无法实例多个simditor对象 (#5)
1 parent 144da64 commit 6c5c2c8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Editor.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ public function render()
2525
$token = csrf_token();
2626
$config = json_encode((array)config('admin.extensions.simditor.config'));
2727
$this->script = <<<EOT
28-
var config = {$config}
29-
config['textarea'] = $('#{$this->id}')
30-
config['upload']['params'] = {_token: '{$token}'}
31-
$(document).ready(function(){
32-
var editor = new Simditor(config);
33-
});
28+
$(document).ready(function(){
29+
var config = {$config}
30+
config['textarea'] = $('#{$this->id}')
31+
config['upload']['params'] = {_token: '{$token}'}
32+
var editor = new Simditor(config);
33+
});
3434
EOT;
3535
return parent::render();
3636
}

0 commit comments

Comments
 (0)