mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 06:56:15 +00:00
Add ace editor (#269)
This commit is contained in:
17
resources/views/components/editor.blade.php
Normal file
17
resources/views/components/editor.blade.php
Normal file
@ -0,0 +1,17 @@
|
||||
<div>
|
||||
<div
|
||||
id="{{ $id }}"
|
||||
{{ $attributes->merge(["class" => "mt-1 min-h-[400px] w-full"]) }}
|
||||
class="ace-vito ace_dark"
|
||||
></div>
|
||||
<textarea id="textarea-{{ $id }}" name="{{ $name }}" style="display: none"></textarea>
|
||||
<script>
|
||||
if (window.initAceEditor) {
|
||||
window.initAceEditor(@json($options));
|
||||
} else {
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
window.initAceEditor(@json($options));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</div>
|
Reference in New Issue
Block a user