Closed Nemachtilli closed 11 months ago
Hi @Nemachtilli , I have tested this in my local environment with the next markup on the codeview
and it's working fine:
<p><strong>Hello</strong><br>World</p>
I suggest:
Try looking for errors on the browser's console. Hopefully, maybe there is an error that may be investigated.
If problem persist, you may try testing the plugin with CDN
files instead of the locally installed ones. It may be a version problem of the plugin files. For example:
'Summernote' => [
'active' => false,
'files' => [
[
'type' => 'js',
'asset' => false,
'location' => 'https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-bs4.min.js',
],
[
'type' => 'css',
'asset' => false,
'location' => 'https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-bs4.min.css',
],
],
],
If this works, then you may download the newest plugin files, install those files locally in the public/vendor
folder and use the old way configuration to avoid using CDN
resources.
Download the summernote js file and add it to my view and it already works, but while with your adminlte plugin it doesn't work and the summernote plugin has already been updated.
@push('js')
<script src="{{ asset('assets/js/summernote.min.js') }}"></script>
<script>
$(document).ready(function() {
$('#summernote').summernote({
height: 300,
});
});
</script>
@endpush
Well, I can't reproduce this on my local environment. You should try to track for an error that gives us a point of investigation. Don't you see any errors on the browser's console when pressing the codeview
button?
It doesn't throw any error in the console, I only have the following:
@section('plugins.Summernote', true)
<x-adminlte-text-editor id="summernote" class="summernote" name="content"
enable-old-suport>
{{ old('content') ?? $unit->content }}
</x-adminlte-text-editor>
@push('js')
<script>
$(document).ready(function() {
$('#summernote').summernote({
height: 300,
});
});
</script>
@endpush
but if I don't add the javascript from the summernote library it doesn't work
<script src="{{ asset('assets/js/summernote.min.js') }}"></script>
Ok, maybe the problem is that the summernote
plugin is initialized twice, since the x-adminlte-text-editor
component already initializes it internally and you're explicitly initializing it again with your script code. Try setting the plugin configuration using the config property of the component, for example:
@section('plugins.Summernote', true)
@php
$config = [
"height" => "300",
]
@endphp
<x-adminlte-text-editor id="summernote" class="summernote" name="content" :config="$config"
enable-old-suport>
{{ old('content') ?? $unit->content }}
</x-adminlte-text-editor>
Then try without including next:
<script src="{{ asset('assets/js/summernote.min.js') }}"></script>
But use the browser's inspector to check that the files you setup on the plugins configuration file are present.
OK okay, I'll try and get back to you as soon as possible.
Closed, no more feedback...
Describe the bug
summernote does not save or display what you write in codeview
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect the video iframe to display but it does not save or display, I am using the package puglin
Environment
This happens locally and in production.
Additional context
I have the plugin installed in my project
php artisan adminlte:plugins install --plugin=summernote
add in my view @section('plugins.Summernote', true)
add in config adminlte.php
Download the summernote.min.js file from the following link:
https://summernote.org/getting-started/
Add the file to my view and it worked
Why does this happen?