Skip to content

Commit

Permalink
Fixed simplemde value encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
tabuna committed Oct 12, 2024
1 parent 5ec3038 commit 675bb95
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions public/css/orchid.css

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions public/js/orchid.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/vendor.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions public/mix-manifest.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion resources/js/controllers/simplemde_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default class extends ApplicationController {
title: 'Insert Horizontal Line',
},
],
initialValue: atob(this.textValue),
initialValue: JSON.parse(this.textValue),
placeholder: this.textarea.placeholder,
spellChecker: false,
});
Expand Down
2 changes: 1 addition & 1 deletion resources/views/fields/simplemde.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@component($typeForm, get_defined_vars())
<div class="simplemde-wrapper" data-controller="simplemde"
data-simplemde-text-value="{{ base64_encode($value) }}">
data-simplemde-text-value='{!! \Illuminate\Support\Js::encode($value) !!}'>
<textarea {{ $attributes }}></textarea>
<input class="d-none upload" type="file" data-action="simplemde#upload">
</div>
Expand Down

0 comments on commit 675bb95

Please sign in to comment.