I use a rich text js plug-in, and after formatting the content
How to save the article to the database according to the currently edited article format, so that the format will not change when it is extracted and displayed at the front desk later?
(The content will also include pictures, which should also involve image URL extraction)
The current idea is to get the html code and save it, but I don’t know how to edit it
淡淡烟草味2017-05-18 10:59:46
The content edited in the rich text editor is the edited Html. The CSS styles of the front and backends are consistent, and the styles displayed in the front and backends are the same.
Take CKEditor as an example. The default editor comes with a contents.css file. You only need to modify this file to customize the style of the background editing content.
The following is an article on how to customize CKEditor. I hope it will be helpful.
CKEDITOR developer site customized version
The server only needs to get the content of editor1.
<form>
<textarea name="editor1" id="editor1" rows="10" cols="80">www.42du.cn</textarea>
</form>
<script type="text/javascript" >
CKEDITOR.replace( 'editor1' );
</script>