Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 140390

Laravel 5: Display the value of my ckeditor textarea in my edit using vue js

$
0
0

This is my first time to apply the vue js in laravel to our project. One of my field in my add / edit is called description and it is a textarea. We implemented the ckeditor in our textarea, now I have a problem in displaying it in my edit component.

App.js

Here in my App.js we applied the ckeditor

ClassicEditor
        .create( document.querySelector( '#edit-description' ), {
            toolbar: [ 'heading', '|', 'bold', 'italic', 'link', '|', 'bulletedList', 'numberedList', '|', 'undo', 'redo' ]
        } )
        .then( editor => {
        theEditEditor = editor; // Save for later use.
    } );

Edit.vue

<div class="row">
    <div class="col-md-12 col-sm-12 col-xs-12">
        <div class="form-group">
            <label>Description</label>
            <textarea class="form-control" name="edit_description" id="edit-description">{{ asset_type_edit.description }}</textarea>
        </div>
    </div>
</div>

EXAMPLE

My List

enter image description here

View

// After I clicked the button in the action column, modal will show

enter image description here

Edit

// When I clicked the edit in the button right corner

enter image description here

NOTE: I also tried the v-html & v-bind:value but it didn't work.

Question: How do I display the value of my ckeditor(description) in my display component?


Viewing all articles
Browse latest Browse all 140390

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>