Hello,
I am reading a plaintext file into CKEditor, but when displaying the content, all CRLF from the file is lost and I get every formatting lost...
Can anybody please have a look at this?
$this->setAttrib('class', 'ckeditor'); try { $appiniPath = APPLICATION_PATH . '/configs/application.ini'; $resource = fopen($appiniPath, 'rb'); // b flag means read binary $appini = ""; while ($rs = fgets($resource)) { $appini .= $rs . PHP_EOL; } $appini = htmlentities($appini) ; $this->setValue($appiniPath); $this->setValue($appini); } catch (Exception $e) { echo $e; };
source looks not bad:
<textarea name="summary" id="summary" class="ckeditor" rows="24" cols="80">[production] ;baseHttp = webcenter phpSettings.date.timezone = &quot;Europe/Berlin&quot; phpSettings.display_startup_errors = 0