I’m facing a problem and i couldn’t find a solution to solve it. My problem is that i have apply a plugin which called as ( Wysiwyg – summernote editor into my Laravel framework project ) . Everything works fine but when i click on the edit page, the data is unable to retrieve from the database and directly edit with the editor function. Can anyone familiar with this help me out ? Thank you so much
<div class="form-group"> <label for="company_policy_policy_details">Please Enter Policy Details<span<p><font color="#F05340"> *</font></p></label></span> <input type="text" name="policy_details" id="abc" class="form-control" value="{!!$policy->policy_details!!}" cols="139" rows="10"> </textarea> </div> <div id="summernote"></div> <script> $('#abc').summernote({ placeholder:value="{!!$policy->policy_details!!}", tabsize: 2, height: 100 }); </script> </body> </html> </div>`
Expected output = i want the value in placeholder are able to show inside the editor and able to edit it directly , Thankssssss
Advertisement
Answer
I believe this code will show the data from your db.
$('#summernote').summernote({ placeholder: "{!!$policy->policy_details!!}", tabsize: 2, height: 100 }).summernote('code', `{!!$policy->policy_details!!}`);