# aueditor

> Baidu ueditor annex upload Ali cloud revision

Latest version **0.0.1** (published 2018-09-15) · UNLICENSED license · 0 weekly downloads

## Install

```sh
npm install aueditor
pnpm add aueditor
yarn add aueditor
bun add aueditor
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2018-09-15 |
| First published | 2018-09-15 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 3.5 MB |
| Known vulnerabilities | 0 (+11 in 5 direct dependencies) |
| Install scripts | no |
| GitHub stars | 60 |
| Author | soye |
| Maintainers | eoeoeosong |
| Keywords | ueditor, aliyun |

## Links

- npm: https://www.npmjs.com/package/aueditor
- Repository: https://github.com/SoyeTsin/aueditor
- Homepage: https://github.com/SoyeTsin/aueditor#readme
- Issues: https://github.com/SoyeTsin/aueditor/issues
- npm.io page: https://npm.io/package/aueditor

## Dependencies (8)

- [ejs](https://npm.io/package/ejs.md) ~>2.5.5
- [debug](https://npm.io/package/debug.md) ~0.7.4
- [morgan](https://npm.io/package/morgan.md) ~1.0.0
- [express](https://npm.io/package/express.md) ~4.2.0
- [ueditor](https://npm.io/package/ueditor.md) ^1.0.0
- [body-parser](https://npm.io/package/body-parser.md) ~1.0.0
- [cookie-parser](https://npm.io/package/cookie-parser.md) ~1.0.1
- [static-favicon](https://npm.io/package/static-favicon.md) ~1.0.0

## Alternatives

- [ext-list](https://npm.io/package/ext-list.md) — 6.3M weekly downloads
- [@lexical/selection](https://npm.io/package/@lexical/selection.md) — 3.8M weekly downloads
- [@lexical/text](https://npm.io/package/@lexical/text.md) — 3.6M weekly downloads
- [@lexical/clipboard](https://npm.io/package/@lexical/clipboard.md) — 3.0M weekly downloads
- [@tiptap/extension-mention](https://npm.io/package/@tiptap/extension-mention.md) — 3.0M weekly downloads

## Recent versions

- 0.0.1 (latest) — 2018-09-15

## README

#Node.js : aueditor

aueditor for nodejs 可以让你的UEditor支持nodejs 并上传附件到阿里云对象存储


```
 丢进NODE.JS项目的这里面 node_modules（传npm好麻烦，也没几个人用懒得传了）
 在app.js加上如下代码所示几个东东
 记得阿里云几个依赖的模块也加上：https://github.com/aliyun-UED/aliyun-sdk-js
 前端页面引入例子里的ueditor
 剩下的都交给插件吧


```



```
##Example
```javascript
var express = require('express');
var ejs = require('ejs');
var path = require('path');
var app = express();

var ueditor = require("ueditor");
ueditor.initAliyunFun("region", "accessKeyId", "accessKeySecret", "对象访问的起始域名或IP");
//配置阿里云对象存储获取到的几个参数，如：("oss-cn-shenzhen", "7Y2Ss1o564JJed2z", "csjRXdPub7kPb7JHGhwD0xOPEGBR8Q", "http://img.nodejsnet.com/")
var bodyParser = require('body-parser');

app.use(bodyParser.urlencoded({
    extended: true
}));
app.use(bodyParser.json());
// view engine setup


app.use(express.static(path.join(__dirname, 'public')));
app.set('views', path.join(__dirname, 'views'));
app.engine('.html', ejs.__express);
app.set('view engine', 'html');

app.use("/ueditor/ue", ueditor(path.join(__dirname, 'public'), function (req, res, next) {
    // ueditor 客户发起上传图片请求
    if (req.query.action === 'uploadimage') {
        var foo = req.ueditor;
        var date = new Date();
        var imgname = req.ueditor.filename;

        var img_url = '/images/ueditor/';
        res.ue_up(img_url); //你只要输入要保存的地址 。保存操作交给ueditor来做
    }
    //  客户端发起图片列表请求
    else if (req.query.action === 'listimage') {
        var dir_url = '/images/ueditor/';
        res.ue_list(dir_url); // 客户端会列出 dir_url 目录下的所有图片
    }
    // 客户端发起其它请求
    else {
        // console.log('config.json')
        res.setHeader('Content-Type', 'application/json');
        res.redirect('/ueditor/nodejs/config.json');
    }
}));


app.use('/', function (req, res) {
    res.render('ueditor');
});

app.listen(3000, function () {
    console.log('app listen : 3000');
});

module.exports = app;

```

---
_Source: https://npm.io/package/aueditor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
