[WIP] Refactor project
This commit is contained in:
39
resources/views/vendor/boilerplate/plugins/demo/codemirror.blade.php
vendored
Normal file
39
resources/views/vendor/boilerplate/plugins/demo/codemirror.blade.php
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
@include('boilerplate::load.codemirror', ['theme' => 'storm'])
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$(function () {
|
||||
$('#code').codemirror();
|
||||
})
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@component('boilerplate::card', ['color' => 'warning', 'title' => 'CodeMirror'])
|
||||
Usage :
|
||||
<pre>
|
||||
@include('boilerplate::load.codemirror', ['theme' => 'storm'])
|
||||
@push('js')
|
||||
<script>
|
||||
var myCode = $('#code').codemirror();
|
||||
// To get the value : myCode.getValue();
|
||||
</script>
|
||||
@endpush</pre>
|
||||
<textarea id="code"><h1>CodeMirror demo</h1>
|
||||
<style>
|
||||
.color {
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
$(function () {
|
||||
alert('demo');
|
||||
});
|
||||
</script>
|
||||
</textarea>
|
||||
|
||||
@slot('footer')
|
||||
<div class="small text-muted text-right">
|
||||
<a href="https://codemirror.net/" target="_blank">CodeMirror</a>
|
||||
</div>
|
||||
@endslot
|
||||
@endcomponent
|
||||
Reference in New Issue
Block a user