图片编辑器
连接 Toast UI 图片编辑器,可直接在文档中编辑图像:裁剪、调整大小、应用效果等。
插件类型: 可视化、非系统插件。
支持的编辑器: 文档、电子表格、演示文稿。
安装方式
在 ONLYOFFICE 编辑器的云端、本地部署和桌面版本中默认可用。
插件 GUID:{07FD8DFA-DFE0-4089-AL24-0730933CC80A}
。
## 使用方法
- 在文档中选择一张图片。
- 在插件选项卡中找到图片编辑器插件。
- 图片下方会显示用于编辑的各项设置。
- 设置完成后点击确定按钮。
插件结构
GitHub 仓库:photoeditor。
-
config.json、index.html 和 photoeditor.js
-
图标
-
翻译文件夹包含俄语、德语、西班牙语、捷克语和法语的翻译
-
插件关于窗口对应的 index_about.html
-
black-theme.css、black-theme.js、white-theme.css 和 white-theme.js 用于设置插件的深色或浅色主题
-
第三方服务:
- jQuery:一个快速且简洁的 JavaScript 库,用于简化 HTML 文档遍历、事件处理、动画和 Ajax 交互。许可证:MIT License。
- Toast UI 图片编辑器:一款基于 HTML5 Canvas 的全功能图像编辑器,易于使用并提供强大的滤镜功能。许可证:MIT License。
配置
{
"name": "Photo Editor",
"nameLocale": {
"fr": "Photo Editor",
"es": "Editor de Fotos",
"pt-BR": "Editor de foto",
"de": "Foto-Editor"
},
"guid": "asc.{07FD8DFA-DFE0-4089-AL24-0730933CC80A}",
"version": "1.0.1",
"baseUrl": "",
"variations": [
{
"description": "Edit images, screenshots, and photos right in your documents: crop, resize, apply effects.",
"descriptionLocale": {
"fr": "Modifiez des images, des captures d'écran et des photos directement dans vos documents: coupez, ajustez, appliquez des effets.",
"es": "Edite imágenes, capturas de pantalla y fotos directamente en sus documentos: recorte, cambie el tamaño y aplique efectos.",
"pt-BR": "Edite imagens, capturas de tela e fotos diretamente em seus documentos: corte, redimensione e aplique efeitos.",
"de": "Bearbeiten Sie Bilder, Screenshots und Fotos direkt in Dokumenten: Zuschneiden, Größe ändern, Effekte anwenden."
},
"url": "index.html",
"icons": ["resources/light/icon.png", "resources/light/icon@2x.png"],
"icons2": [
{
"style": "light",
"100%": {
"normal": "resources/light/icon.png"
},
"125%": {
"normal": "resources/light/icon@1.25x.png"
},
"150%": {
"normal": "resources/light/icon@1.5x.png"
},
"175%": {
"normal": "resources/light/icon@1.75x.png"
},
"200%": {
"normal": "resources/light/icon@2x.png"
}
},
{
"style": "dark",
"100%": {
"normal": "resources/dark/icon.png"
},
"125%": {
"normal": "resources/dark/icon@1.25x.png"
},
"150%": {
"normal": "resources/dark/icon@1.5x.png"
},
"175%": {
"normal": "resources/dark/icon@1.75x.png"
},
"200%": {
"normal": "resources/dark/icon@2x.png"
}
}
],
"isViewer": false,
"EditorsSupport": ["word", "cell", "slide"],
"isVisual": true,
"isModal": true,
"isInsideMode": false,
"initDataType": "html",
"initData": "",
"buttons": [
{
"text": "Ok",
"primary": true
},
{
"text": "Cancel",
"primary": false,
"isViewer": false,
"textLocale": {
"fr": "Annuler",
"es": "Cancelar",
"de": "Abbrechen"
}
}
],
"size": [10000, 10000],
"store": {
"background": {
"light": "linear-gradient(180deg, #FF8E3D 0%, #FF6F3D 100%)",
"dark": "linear-gradient(180deg, #FF8E3D 0%, #FF6F3D 100%)"
},
"screenshots": [
"resources/store/screenshots/screen_1.png",
"resources/store/screenshots/screen_2.png"
],
"icons": {
"light": "resources/store/icons",
"dark": "resources/store/icons"
},
"categories": ["specAbilities", "work", "recommended"]
}
},
{
"description": "About",
"descriptionLocale": {
"fr": "À propos",
"es": "Sobre programa",
"de": "Über"
},
"url": "index_about.html",
"icons": ["resources/img/icon.png", "resources/img/icon@2x.png", "resources/img/icon2.png", "resources/img/icon2@2x.png"],
"isViewer": false,
"EditorsSupport": ["word", "cell", "slide"],
"isVisual": true,
"isModal": true,
"isInsideMode": false,
"initDataType": "none",
"initData": "",
"size": [392, 147]
}
]
}
方法和事件
- button
- init
- onTranslate
- callCommand
- executeMethod ("GetImageDataFromSelection")
- executeMethod ("GerVersion")
- executeMethod ("PutImageDataToSelection")
- resizeWindow
- Asc.scope object
- info.editorType
支持
如需请求功能或报告此插件的问题,请通过 GitHub Issues 页面提交。