We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5daee11 commit 49bd152Copy full SHA for 49bd152
src/Editor.php
@@ -57,16 +57,18 @@ public function render()
57
58
$config = json_encode($config);
59
60
+ $varName = 'simplemde_'.uniqid();
61
+
62
$this->script = <<<EOT
63
64
var options = {element: $("#{$this->id}")[0]};
65
66
Object.assign(options, {$config});
67
-var simplemde = new SimpleMDE(options);
68
+var $varName = new SimpleMDE(options);
69
-simplemde.codemirror.on("change", function(){
- var html = simplemde.value();
70
+$varName.codemirror.on("change", function(){
71
+ var html = $varName.value();
72
$('input[name=$name]').val(html);
73
});
74
0 commit comments