I am using a CKEditor and saving content to a MySQL database. When trying to edit the content again in the editor, I am getting HTML tags displayed as text, for example:
my test<br />and second line
How can I have it display in the editor correctly again?
I have been fiddling with htmlentities and html_entity_decode and CKEditor related settings for over an hour now, with no avail.
$config = array();
$config['enterMode'] = 2;
$config['shiftEnterMode'] = 1;
//$config['basicEntities'] = FALSE;
//$config['entities'] = FALSE;
//$config['entities_greek'] = FALSE;
//$config['entities_latin'] = FALSE;
//$config['htmlDecodeOutput'] = TRUE;
$ck_editor->editor("sec1_content", $default_value, $config);
$ck_editor->editor("sec1_content", html_entity_decode(set_value('sec1_content', $default_value)), $config);