Pārlūkot izejas kodu

Merge pull request #167 from VieTu/dev-x

Jiang Qinghua 5 gadi atpakaļ
vecāks
revīzija
d08e675d83

+ 1 - 1
resources/views/form/markdown.blade.php

@@ -8,7 +8,7 @@
 
         <div class="{{$class}}" id="{{$id}}" name="{{$name}}" placeholder="{{ $placeholder }}" {!! $attributes !!} ></div>
 
-        <template id="{{$id}}-template">{{ old($column, $value) }}</template>
+        <div id="{{$id}}-template" class="d-none">{{ old($column, $value) }}</div>
 
         @include('admin::form.help-block')
 

+ 1 - 1
src/Form/Field/Markdown.php

@@ -147,7 +147,7 @@ class Markdown extends Field
         $this->options['onload'] = JavaScript::make(
             <<<JS
 function () {
-    this.setMarkdown($('#{$this->id}-template').html());
+    this.setMarkdown($('#{$this->id}-template').text());
 }
 JS
         );