phpweb是一个企业建站系统了可以快速的实现企业群站创建了,但这款使用的编辑器并不是百度编辑器对于小编来讲是非常喜欢百度编辑器了,下面一起来看看phpweb更换百度编辑器的配置。
准备工作:
1.从UEditor 官网上面下载 最新版本的UEditor,现在最新版本为ueditor1_4_3-utf8-php,请下载php版本。
2.我们更换的是 news 模块下的编辑器,也就是新闻模块,请确保news/admin/下面,news_conadd.php,news_conmod.php,已经破解出源码,如果没有,请自行百度!
开始动手:
1.解压下载的压缩包直接到phpweb根目录
2.打开news_conadd.php文件夹
找到以下代码:
<input type="hidden" name="body" value="<?php echo $body; ?>" /> <script type="text/javascript" src="../../kedit/KindEditor.js"></script> <script type="text/javascript"> var editor = new KindEditor("editor"); editor.hiddenName = "body"; editor.editorWidth = "680px"; editor.editorHeight = "300px"; editor.skinPath = "../../kedit/skins/default/"; editor.uploadPath = "../../kedit/upload_cgi/upload.php"; editor.imageAttachPath = "news/pics/"; editor.iconPath = "../../kedit/icons/"; editor.show(); function KindSubmit() { editor.data(); } </script>
然后直接注释掉,或者删除。
加入
然后在下面插入
<!-- 配置文件 --> <script type="text/javascript" src="../../ueditor/ueditor.config.js"></script> <!-- 编辑器源码文件 --> <script type="text/javascript" src="../../ueditor/ueditor.all.js"></script> <!-- 实例化编辑器 --> <script type="text/javascript"> var ue = UE.getEditor('container',{ initialFrameWidth:"800", initialFrameHeight:"200" }); </script>
这样,新闻的添加就好了。
下面就是新闻的修改;
步骤和添加一样只是在实例化编辑器后面加入
<script type="text/javascript"> var ue = UE.getEditor('container',{ initialFrameWidth:"800", initialFrameHeight:"200", }); ue.ready(function() { //设置编辑器的内容 ue.setContent('<?php echo htmlspecialchars_decode($body);?>'); }); </script>
这样 修改就可以了。
注意:更换完成编辑器后,原来phpweb自带的分页就不能使用了。
下面是修改新闻的时候:
写在最后:
百度UEditor 的上传图片路径是统一默认的,如果要修改,请打开 ueditor/php/config.json 下面进行修改。
文章链接:
随便收藏,请保留本文地址!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Notepad++7.3.1
Easy-to-use and free code editor

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool
