Create content adding page
We used the add.html file earlier. Here we use the add function to continue using this page. Modify the add.html file to add.php
and then modify the html and css codes to keep what we need.
Here we add a Baidu editor plug-in ueditor. Create a bianji document in the admin document and put the editor plug-in file downloaded from Baidu into it.
Here you need to introduce two js codes in the <head> tag at the head of the page:
<script type="text/javascript" charset="utf-8" src="bianji/ueditor.config.js"></script> <script type="text/javascript" src="bianji/ueditor.all.js"></script>
Introduce a piece of js code in the <body> tag:
<script type="text/javascript"> //实例化编辑器 //建议使用工厂方法getEditor创建和引用编辑器实例,如果在某个闭包下引用该编辑器,直接调用UE.getEditor('editor')就能拿到相关的实例 UE.getEditor('content',{initialFrameWidth:1200,initialFrameHeight:450}); </script>
In this way, Baidu Editor was successfully introduced.
The newly created added page after modification is as follows: