Profile

User profile and story timeline

user-img
nyg

Ck编辑器用于保存HTML,因此它将它保存在数据库中。如果您只想保存文本,则不需要使用ck-editor,因为它是用于格式化文本的。但是,如果你想使用它,那么正确的方法是在保存到数据库之前通过功能 http://php.net/manual/en/function.html-entity-decode.php,并在检索它时,通过功能http://php.net/manual/en/function.htmlentities.php,然后将它放入ckeditor中,然后您可以编辑它或放到你所在的位置在一个页面中显示它。

如果你想剥离标签,然后使用这个函数php.net/manual/en/function.strip-tags.php,但在这种情况下,你将失去文本格式。

回复