<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>AiEditor Demo</title>
<link type="text/css" rel="stylesheet" href="./aieditor/style.css">
<script type="module">
import {AiEditor} from './aieditor/index.es.js'
new AiEditor({
element: "#aiEditor",
placeholder: "点击输入内容...",
content: 'AiEditor 是一个面向 AI 的下一代富文本编辑器。<p> <strong>提示:</strong> <br/>1、输入 空格 + "/" 可以快速弹出 AI 菜单 <br/> 2、输入 空格 + "@" 可以提及某人</p> ',
onMentionQuery: (query) => {
return [
'Michael Yang', 'Jean Zhou', 'Tom Cruise', 'Madonna', 'Jerry Hall', 'Joan Collins', 'Winona Ryder'
, 'Christina Applegate', 'Alyssa Milano', 'Molly Ringwald', 'Ally Sheedy', 'Debbie Harry', 'Olivia Newton-John'
, 'Elton John', 'Michael J. Fox', 'Axl Rose', 'Emilio Estevez', 'Ralph Macchio', 'Rob Lowe', 'Jennifer Grey'
, 'Mickey Rourke', 'John Cusack', 'Matthew Broderick', 'Justine Bateman', 'Lisa Bonet',
].filter(item => item.toLowerCase().startsWith(query.toLowerCase())).slice(0, 5)
},
ai: {
model: {
xinghuo: {
appId: "***",
apiKey: "***",
apiSecret: "***",
}
}
},
})
</script>
<script>
let isDark = false;
function dark() {
if (!isDark) {
document.body.style.background = "#1a1b1e"
document.querySelector("#title").style.color = "#eee"
document.querySelector("#aiEditor").classList.remove("aie-theme-light");
document.querySelector("#aiEditor").classList.add("aie-theme-dark");
} else {
document.body.style.background = ""
document.querySelector("#title").style.color = ""
document.querySelector("#aiEditor").classList.remove("aie-theme-dark");
document.querySelector("#aiEditor").classList.add("aie-theme-light");
}
isDark = !isDark;
}
var _hmt = _hmt || [];
(function () {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?9fd447a0f9e62a84d1b752a2cacb2c6b";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body>
<div style="padding: 10px 20px;font-size: 30px" id="title">
AiEditor,一个面向 AI 的下一代富文本编辑器。
<button onclick="dark()">切换主题</button>
<br/>
开源网址:<a href="https://gitee.com/aieditor-team/aieditor"
target="_blank">https://gitee.com/aieditor-team/aieditor</a>
</div>
<div id="aiEditor" style="height: 550px; margin: 20px"></div>
</body>
</html>
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
AiEditor 是一个面向 AI 的下一代富文本编辑器,她基于 Web Component,因此支持 Layui、Vue、React、Angular 等几乎任何前端框架。她适配了 PC Web 端和手机端,并提供了 亮色 和 暗色 两个主题。除此之外,她还提供了灵活的配置,开发者可以方便的使用其开发任何文字编辑的应用
资源推荐
资源详情
资源评论
收起资源包目录
基于 Web Component一个面向 AI 的下一代富文本编辑器 (109个子文件)
.eslintrc.cjs 487B
style.css 15KB
.gitignore 276B
index.html 3KB
index.html 2KB
index.html 2KB
index.js 1MB
package-lock.json 191KB
package-lock.json 16KB
package.json 2KB
tsconfig.json 527B
tsconfig.json 527B
package.json 268B
aieditor.less 11KB
aiecontent.less 3KB
variable.less 2KB
LICENSE 26KB
mention.md 780B
fontSize.md 606B
menus.md 536B
fontFamily.md 523B
attachment.md 377B
video.md 372B
image.md 364B
ai.md 156B
screenshot.png 301KB
CodeBlockExt.ts 14KB
TableBubbleMenu.ts 11KB
ImageExt.ts 9KB
VideoExt.ts 8KB
Header.ts 7KB
AiCommandExt.ts 6KB
Ai.ts 6KB
AbstractColorsMenuButton.ts 6KB
AiEditor.ts 6KB
getExtensions.ts 5KB
AttachmentExt.ts 5KB
MentionExt.ts 5KB
LinkBubbleMenu.ts 4KB
AbstractDropdownMenuButton.ts 4KB
IndentExt.ts 4KB
getBubbleMenus.ts 4KB
Table.ts 3KB
Link.ts 3KB
suggestion.ts 3KB
Emoji.ts 3KB
isMarkActive.ts 3KB
Footer.ts 3KB
PainterExt.ts 3KB
Printer.ts 2KB
LineHeightExt.ts 2KB
Popover.ts 2KB
XingHuoSocket.ts 2KB
Align.ts 2KB
Attachment.ts 2KB
FontSize.ts 2KB
XingHuoModel.ts 2KB
Video.ts 2KB
resize.ts 2KB
ImageBubbleMenu.ts 2KB
Image.ts 2KB
AbstractBubbleMenu.ts 2KB
Fullscreen.ts 2KB
IFrameExt.ts 2KB
FontFamily.ts 1KB
FontSizeExt.ts 1KB
Strike.ts 1KB
LineHeight.ts 1KB
AbstractMenuButton.ts 1KB
Highlight.ts 1KB
decorations.ts 1KB
textblockTypeInputRule.ts 1KB
Title.ts 1KB
Painter.ts 1KB
Quote.ts 1KB
isActive.ts 1KB
Superscript.ts 1KB
main.ts 1KB
main.ts 1KB
Subscript.ts 1KB
AbstractWebSocket.ts 1KB
CodeBlock.ts 969B
Bold.ts 898B
Todo.ts 841B
Eraser.ts 839B
FontColor.ts 818B
Undo.ts 803B
Code.ts 802B
Redo.ts 798B
OrderedList.ts 777B
Underline.ts 757B
BulletList.ts 727B
Italic.ts 666B
Break.ts 665B
vite.config.ts 595B
uploadFile.ts 588B
AiModelFactory.ts 586B
IndentDecrease.ts 570B
IndentIncrease.ts 568B
Hr.ts 526B
共 109 条
- 1
- 2
资源评论
Java程序员-张凯
- 粉丝: 1w+
- 资源: 6651
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功