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創(chuàng)建和引用編輯器實例,如果在某個閉包下引用該編輯器,直接調(diào)用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: