Skip to content

Commit 675bb95

Browse files
committed
Fixed simplemde value encoding
1 parent 5ec3038 commit 675bb95

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

public/css/orchid.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/orchid.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/vendor.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/mix-manifest.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/js/controllers/simplemde_controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export default class extends ApplicationController {
151151
title: 'Insert Horizontal Line',
152152
},
153153
],
154-
initialValue: atob(this.textValue),
154+
initialValue: JSON.parse(this.textValue),
155155
placeholder: this.textarea.placeholder,
156156
spellChecker: false,
157157
});

resources/views/fields/simplemde.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@component($typeForm, get_defined_vars())
22
<div class="simplemde-wrapper" data-controller="simplemde"
3-
data-simplemde-text-value="{{ base64_encode($value) }}">
3+
data-simplemde-text-value='{!! \Illuminate\Support\Js::encode($value) !!}'>
44
<textarea {{ $attributes }}></textarea>
55
<input class="d-none upload" type="file" data-action="simplemde#upload">
66
</div>

0 commit comments

Comments
 (0)