Display Text(HTML) Saved In Database using CkEditor
Just try to use
echo htmlspecialchars_decode($text);
And it will work .
text print with html tags saved from ckeditor to database
You need to remove HTML tag in the view file using the following way:
{!! $company_detail->company_description !!}
Or
strip_tags($company_detail->company_description);
why ckeditor content stored in database do not display as html in php
Try this with php syntax like
{!! $blog->body !!}
Note: Make sure that your editor sending proper html content?
display ckeditor data saved in database in div tag
{!! $object->text !!}
string will auto escape when you'll use {{ }}
How to display ckeditor saved html data from database to normal text in MVC 5
When you use the Html.DisplayFor
helper method, razor will encode the content before rendering. You should use Html.Raw()
helper method which will not encode your content and pass the value you want to render directly to that.
<div class="panel-body">
@Html.Raw(Model.Itinerarydetail.Inclusions)
</div>
Load html text from database to CKEDITOR for updating purpose
How does exactly look $data
? Maybe you have to use htmlspecialchars_decode.
CKEditor displaying HTML tags in editor
It seems that CodeIgniter's func set_value()
acts like htmlspecialchars()
in some way. So if you are getting <any_tag> on CKEditor this workaround can help you. Change
$ck_editor->editor("sec1_content", set_value('sec1_content', html_entity_decode($default_value)), $config);
To this:
$ck_editor->editor("sec1_content", html_entity_decode(set_value('sec1_content', $default_value)), $config);
PoloRM
Put html_entity_decode around set_value. The reason for this is obviously because the set_value method might not use the $default_value parameter but return the posted data instead.
Related Topics
Getting a File to Download Instead of Opening the Browser
How to Pass a PHP Variable Using the Url
Php Json String, Escape Double Quotes for Js Output
How to Add Whatsapp Share Button to PHP Website
How to Generate Unique Random Value for Each User in Laravel and Add It to Database
Regex for No More Than 5 Digits or Contain String
How to Stop PHP Code Execution
How to Get Previous Month from Selected Month
Laravel - Getting Current Month and Year Only
Dompdf Table Fixed Column Width and Break Long Text
Laravel 6: Call to Undefined Method App\\User::Createtoken()
Display Text(Html) Saved in Database Using Ckeditor
Laravel Eloquent Get Results Grouped by Days
Sum Values from Column in HTML
Cannot Simply Use Postgresql Table Name ("Relation Does Not Exist")