2.1 發布,此次版本移除了後端相關代碼,純ajax 提交,請配置neditor.config.js neditor.service.js ,支持各種後端或者云存儲。
該項目需要您的支持, 捐贈以支持此項目的發展。
方式一:完整安裝包(推薦)
方式二: npm安裝
npm i @notadd/neditor -S
方式三:編譯安裝
git clone https://github.com/notadd/neditor.git
npm install
npm run build進入到目錄dist , 使用瀏覽器打開文件index.html 。
如果看到了下面這樣的編輯器,恭喜你,初次部署成功!
Angular 版Neditor
Vue 版Neditor 【第三方維護】
Rails 版Neditor 【第三方維護】
該項目基於MIT 協議開源,任何組織/企業以及個人都可以免費使用(保留版權)。
如果您需要額外商業技術支持或者定制編輯器,請聯繫QQ:1256985886
其他版本待添加
編輯器有很多可自定義的參數項,在實例化的時候可以傳入給編輯器:
var ue = UE . getEditor ( 'container' , {
autoHeight : false
} ) ;配置項也可以通過neditor.config.js文件修改,具體的配置方法請看[前端配置項說明](http://fex.baidu.com/ueditor/#start-config1.4 前端配置項說明.md)、後端配置項說明
編輯器上傳邏輯單獨在neditor.service.js文件配置,具體的配置方法見註釋
通getContent 和setContent 方法可以設置和讀取編輯器的內容
var ue = UE . getContent ( ) ;
ue . ready ( function ( ) {
//设置编辑器的内容
ue . setContent ( 'hello' ) ;
//获取html内容,返回: <p>hello</p>
var html = ue . getContent ( ) ;
//获取纯文本内容,返回: hello
var txt = ue . getContentTxt ( ) ;
} ) ;Ueditor 的更多API請看API 文檔
Neditor 碼雲: http://gitee.com/notadd/neditor
Neditor github 地址:http://github.com/notadd/neditor
Ueditor 官網:http://ueditor.baidu.com
Ueditor API 文檔:http://ueditor.baidu.com/doc
Ueditor 文檔:http://fex.baidu.com/ueditor/
注: 對IE8以下版本不再承諾兼容
使用了又拍雲CDN 服務,支持跨域和https。
如果有需要,也可將下面域名改成自己的。
imgbaidu.b0.upaiyun.com
tingapi.b0.upaiyun.com
Neditor官方交流群:257753500
QQ 群: 321735506
issue
https://github.com/notadd/notadd