Table of Contents
UEditor编辑器并不难,ueditor并不难
1.背景:
2.编辑器原理:
3.常见的编辑器:
4.如何学习编辑器:最权威,最官方的就是取看官方文档【以UEditor为例】
Home php教程 php手册 UEditor编辑器并不难,ueditor并不难

UEditor编辑器并不难,ueditor并不难

Jun 13, 2016 am 08:53 AM
editor

UEditor编辑器并不难,ueditor并不难

1.背景:

       其实学习UEditor本该在这之前就应该学习整合到自己的项目中的了,第一次接触UEditor是在暑假期间,当时做东西在师兄的代码中发现了这东西,心想:卧槽,竟然可以这样整合别人的东西!      学习接口性质类的东西,最官方权威的时候是看官方文档,但是我想还是有人因该跟我一样,对这东西天生还是有点恐惧感的!多少需要别人来告诉自己一声:其实这个很简单,这么去学就很简单了!因此,有缘人啊....如果看到这篇文章并且坚持看到了这里,那你不妨继续看下去,在这篇博客中,记录了:编辑器的原理各种常用编辑器的引入的一个大概的思路与学习方法!【当然,如果写错了,还请留下您宝贵的指点意见,谢谢指教,欢迎指教学习】(由于从为知笔记同步到博客的,代码编排真是丑哭了朕,所以我附上的是代码截图)       百度针对论坛贴吧评论,又做了一个UM的编辑器,是UE的简化版!大家也可以去看看~ 对于此次学习,有以下几点编程感悟: ==>1).技术都是想的难,其实很简单==>难是难在自己的想法了,认为很难!要尝试静下心去看这个东西! ==>2).对于编辑器,在线支付,微信开发接口....这些不是PHP知识点的知识[因为这些东西都是单纯的调用API罢了],最好的方法==>读官方手册,最权威;看下载压缩包中的example实例,入门最快; ==>3).多动手,跟着官方文档的思路去敲代码!你不可能会所有语言,因此对待不懂的语言不要去抗拒!语言是学不完的【不管你懂不懂引入的这个语言,先把东西做出来再说】

2.编辑器原理:

    1).什么是编辑器==>对文字有编辑作用[修改,删除....],对文字的加粗,划下划线......这些都是对文字样式的改变(其实并不属于编辑器的功能,但是现在大多编辑器都集成了)           ==>下面这段代码,对于“hello world!”这几个字只是单纯的一个显示,我们无法删除,无法重新修改           ==>但是对于下面这个div呢?你还是单单只能看这个内容:“hello lms, what you like ?......”吗?     2).编辑器原理:           ==>插入一个iframe,并利用网页的contentEditable属性,使得该iframe可以编辑;           ==>利用JS改变文字的样式,完成加粗,变色,加下划线,上传图片效果           ==>最后获取该区域的内容即可!至于如何处理,这些都是业务逻辑代码了!

3.常见的编辑器:

1).比较长久老牌:FCKEditor-->更名为CKEditor;KindEditor【比较老,教程这些的都很多....】
2).国内淘宝用的:ewebEditor
3).目前比较新,流行的:UEditor,UM编辑器[为论坛贴吧定制的]==>都是百度出的!
Copy after login

4.如何学习编辑器:最权威,最官方的就是取看官方文档【以UEditor为例】

          1).如何引入                      ==>就是引入几个js文件的事                      ==>http://fex.baidu.com/ueditor/官方DOC文件《1.2 创建demo文件》中有详细说明

          2).如何个性化配置==>                 (1).在引入页面覆盖配置【推荐使用这个】                      ==>去配置文件中找到对应的配置项,拼接成一个对象,当成参数传给UE.getEditor('container',{配置项1 , 配置项2, ...... })进行设置                 (2).对配置文件进行修改==>【一修改,那么所有引用了这个编辑器的都会被更改】                      ==>ueditor.config.js【前台显示配置】           3).如何与自己系统整合==>                 (1).现在你所需要运用编辑器的地方,将编辑器的"前端"引入进来;==>路径URL写死[整合到项目中的时候,资源是不能乱放的]                 (2).==>对应语言的包下的config.json【后台处理配置--图片、视频上传路径....将默认的目录路径改为你要存放的地方】                             .在表单中要加上: enctype="multipart/form-data"==>有文件上传,图片上传等必须要加[以二进制数据进行传输数据]                             .对于不明确的路径,使用firebug查看原本路径,一直追溯路径变量                             ③.使用firebug查看返回来的值,查看返回来的[以上两个是针对于出现问题时候,调试可以用的方法]                             ④.UE的1.4.2+版本中的通用上传类Upload.class.php,所有配置都写在了config.json中,只需要在config.json中修改对于路径即可                            ⑤.1.4.2+ 以后路径配置主要相关的配置项是 PathFormat【上传保存路径】 和 UrlPrefix【访问路径--对于ASP和.net来说需要配置】的配置项                        ⑥.1.4.2+ 路径配置项无论是否以 "/" 开头,都是相对于 网站根目录 的路径。                              ⑦.后台会过滤模板上的非法字符==> \ : * ? " |   ==>这些非法字符都会被替换成空   来自为知笔记(Wiz)



Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to fix file names or extensions that are too long in Windows 11? How to fix file names or extensions that are too long in Windows 11? Apr 22, 2023 pm 04:37 PM

Have you ever faced any issues while transferring files that prevented you from doing so? Well, many Windows users have recently reported that they faced issues while copying and pasting files into a folder, where an error was thrown saying “The file name of the destination folder is too long”. Additionally, some other Windows users expressed frustration when opening any file and said "the file name or extension is too long" and they were unable to open the file. This disappoints users by not allowing them to transfer files to any other folder. While analyzing the issue, we have come up with a series of solutions that may help alleviate the issue and allow users to transfer files easily. If you are in a similar situation, please see this post for more information. Source: https

How to turn off Windows Defender Smart Screen in Windows 11, 10? How to turn off Windows Defender Smart Screen in Windows 11, 10? Apr 26, 2023 am 11:46 AM

Many Windows users have recently reported that they were annoyed when Windows Defender SmartScreen warned users not to launch applications that were not recognized by Microsoft Windows and they had to click on the "Run anyway" option every time. Windows users are unsure what they can currently do to avoid or disable it. After researching the issue, we found that Windows Defender functionality on the system can be disabled through the Settings application or the Local Group Policy Editor or by adjusting the registry files. By doing this, users will no longer have to face the defender SmartScreen. If your system also encounters

Detailed guide to 15 Python editors/IDEs, there is always one that suits you! Detailed guide to 15 Python editors/IDEs, there is always one that suits you! Aug 09, 2023 pm 05:44 PM

There is no better way to write Python code than using an integrated development environment (IDE). Not only can they make your work simpler and more logical, they can also improve programming experience and efficiency. Everyone knows this. The question is, how to choose the best Python development environment among the many options.

Essential software for C language programming: five good helpers recommended for beginners Essential software for C language programming: five good helpers recommended for beginners Feb 20, 2024 pm 08:18 PM

C language is a basic and important programming language. For beginners, it is very important to choose appropriate programming software. There are many different C programming software options on the market, but for beginners, it can be a bit confusing to choose which one is right for you. This article will recommend five C language programming software to beginners to help them get started quickly and improve their programming skills. Dev-C++Dev-C++ is a free and open source integrated development environment (IDE), especially suitable for beginners. It is simple and easy to use, integrating editor,

Fix the issue where Windows 11/10 login options are disabled Fix the issue where Windows 11/10 login options are disabled May 07, 2023 pm 01:10 PM

Many Windows users have encountered the problem of being unable to log in to Windows 11/10 systems due to failed login attempts or multiple system shutdowns. Users are frustrated because there is nothing they can do about it. Users may forget their PIN code to log into the system, or experience lags when using or installing software, and the system may be forced to shut down multiple times. Therefore, we have compiled a list of the best available solutions that will undoubtedly help consumers solve this problem. To learn more, continue reading this article. Note: Before doing this, make sure you have your system's administrator credentials and Microsoft account password to reset your PIN. If not, wait an hour or so and try with the correct PIN

Ten Python IDEs and code editors highly recommended! Ten Python IDEs and code editors highly recommended! Apr 19, 2023 pm 07:04 PM

Python is a very easy to learn, powerful programming language. Python includes efficient high-level data structures, providing simple and efficient object-oriented programming. The learning process of Python is indispensable without an IDE or code editor, or an integrated development editor (IDE). These Python development tools help developers speed up development using Python and improve efficiency. An efficient code editor or IDE should provide plug-ins, tools and other features that can help developers develop efficiently. 1.VimVim can be said to be the best IDE for Python. Vim is an advanced text editor designed to provide the actual Unix editor 'Vi' functionality and support more and more complete features.

How to use ClipChamp: the free Windows 11 video editor How to use ClipChamp: the free Windows 11 video editor Apr 20, 2023 am 11:55 AM

Remember Windows MovieMaker on Windows 7? Since discontinuing Windows MovieMaker, Microsoft hasn't launched any real movie makers. On the other hand, they tried to revamp the Photos app with a small and lightweight built-in video editor. After a long time, Microsoft launched Clipchamp, a better video processor for all Windows 11 devices. In this article, we’ll take a deep dive into how to get everything from the Clipchamp app on your Windows 11 device. How to use Clipchamp – Detailed tutorials are available

Introduction to Go language development tools: a list of essential tools Introduction to Go language development tools: a list of essential tools Mar 29, 2024 pm 01:06 PM

Title: Introduction to Go language development tools: List of essential tools In the development process of Go language, using appropriate development tools can improve development efficiency and code quality. This article will introduce several essential tools commonly used in Go language development, and attach specific code examples to allow readers to understand their usage and functions more intuitively. 1.VisualStudioCodeVisualStudioCode is a lightweight and powerful cross-platform development tool with rich plug-ins and functions.

See all articles