mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
docs: document update
This commit is contained in:
parent
49d93c4348
commit
0c6d72446e
22
README.md
22
README.md
@ -20,6 +20,8 @@
|
||||
</a>
|
||||
</p>
|
||||
|
||||
简体中文 | [English](README_EN.md)
|
||||
|
||||
|
||||
# 🎨 PPTist
|
||||
> 一个基于 Vue3.x + TypeScript 的在线演示文稿(幻灯片)应用,还原了大部分 Office PowerPoint 常用功能,支持 文字、图片、形状、线条、图表、表格、视频、音频、公式 几种最常用的元素类型,每一种元素都拥有高度可编辑能力,同时支持丰富的快捷键和右键菜单,力求还原桌面应用级体验。支持导出本地 PPTX 文件,支持移动端基础编辑和预览。您可以在此基础上搭建自己的在线幻灯片应用。
|
||||
@ -32,7 +34,7 @@
|
||||
2. 本项目的目标受众是<b>有【Web 幻灯片】开发需求的开发者</b>,提供的链接只是一个演示地址,不提供任何在线服务。你不应该直接将本项目作为工具使用,也不支持一键部署。
|
||||
如果你只是需要一个服务或工具,可以选择更优秀和成熟的产品,例如:[石墨文档](https://shimo.im/)、[金山文档](https://www.kdocs.cn/)、[Slidev](https://sli.dev/)、[revealjs](https://revealjs.com/) 等。
|
||||
3. 本项目是基于 DOM 的渲染方案,优点是简单易上手。但是相比 Canvas 渲染的方案,在复杂场景下性能会存在一定的差距,所以如果你对性能有较高的要求,本项目可能不是一个好的选择/参考方向。
|
||||
4. 这里总结了一些[常见问题](https://github.com/pipipi-pikachu/PPTist/blob/master/doc/Q&A.md),第一次提 Issues 和 PR 时,务必提前阅读此文档。
|
||||
4. 这里总结了一些[常见问题](/doc/Q&A.md),第一次提 Issues 和 PR 时,务必提前阅读此文档。
|
||||
|
||||
|
||||
# 🚀 项目运行
|
||||
@ -169,22 +171,26 @@ npm run dev
|
||||
|
||||
# 🎯 开发
|
||||
目前没有完整的开发文档,但下面这些文档可能会对你有一些帮助:
|
||||
- [项目目录与数据结构](https://github.com/pipipi-pikachu/PPTist/blob/master/doc/DirectoryAndData.md)
|
||||
- [画布与元素的基本原理](https://github.com/pipipi-pikachu/PPTist/blob/master/doc/Canvas.md)
|
||||
- [如何自定义一个元素](https://github.com/pipipi-pikachu/PPTist/blob/master/doc/CustomElement.md)
|
||||
- [项目目录与数据结构](/doc/DirectoryAndData.md)
|
||||
- [画布与元素的基本原理](/doc/Canvas.md)
|
||||
- [如何自定义一个元素](/doc/CustomElement.md)
|
||||
|
||||
|
||||
# 📄 版权声明/开源协议
|
||||
[AGPL-3.0 License](https://github.com/pipipi-pikachu/PPTist/blob/master/LICENSE) | Copyright © 2020-PRESENT [pipipi-pikachu](https://github.com/pipipi-pikachu)
|
||||
[AGPL-3.0 License](/LICENSE) | Copyright © 2020-PRESENT [pipipi-pikachu](https://github.com/pipipi-pikachu)
|
||||
|
||||
# 🧮 商业用途
|
||||
- 如果你希望将本项目商用盈利,我希望你能尊重开源,严格遵循 AGPL-3.0 协议,回馈开源社区;
|
||||
- 如果你希望将本项目商用盈利,我希望你能尊重开源,遵循 AGPL-3.0 协议,回馈开源社区;
|
||||
- 如果你因为任何原因,必须要闭源商用,无法执行 AGPL-3.0 协议,可以选择:
|
||||
1. 使用早期的 [Apache 2.0 LICENSE 版本](https://github.com/pipipi-pikachu/PPTist/archive/f1a35bb8e045124e37dcafd6acbf40b4531b69aa.zip)(建议);
|
||||
1. 使用早期的[Apache 2.0 LICENSE 版本](https://github.com/pipipi-pikachu/PPTist/archive/f1a35bb8e045124e37dcafd6acbf40b4531b69aa.zip);
|
||||
2. 成为项目的贡献者,大致包括:
|
||||
- 你的代码被本项目作为依赖引用;
|
||||
- 你给本项目提交过重要的 PR 并且被合并;
|
||||
- 你参与过本项目的设计,也包括对各种功能/模块的实现或Bug的修复提供了有价值的思路;
|
||||
- 注1:满足条件的单位在商用前请先联系作者确认资格,避免误会。
|
||||
- 注2:先违反协议后再成为贡献者不在此项范围;
|
||||
3. 邮件联系作者付费商用(如果可以,我更希望你一起加入到开源社区中来);
|
||||
3. 联系作者付费商用;
|
||||
|
||||
### 👎 耻辱柱:
|
||||
> 在多次提醒后仍旧无视本开源协议的公司/产品:
|
||||
- 爱客易智能科技(上海)有限公司 https://www.mindshow.vip/
|
||||
|
157
README_EN.md
Normal file
157
README_EN.md
Normal file
@ -0,0 +1,157 @@
|
||||
[中文](README.md) | English
|
||||
|
||||
|
||||
# 🎨 PPTist
|
||||
> A web-based presentation (slideshow) application built with Vue3.x and TypeScript, that replicates most of the common features of Microsoft Office PowerPoint, allowing for the editing and presentation of PPTs online. It offers a rich set of shortcuts and right-click context menus, aiming to recreate a desktop-like application experience. Additionally, it supports exporting to local PPTX files. If you’re looking to develop a “Web Slideshow Application,” PPTist is a great place to start.
|
||||
|
||||
<b>Try it online👉:[https://pipipi-pikachu.github.io/PPTist/](https://pipipi-pikachu.github.io/PPTist/)</b>
|
||||
|
||||
|
||||
# 🚀 Installation
|
||||
```
|
||||
npm install
|
||||
|
||||
npm run dev
|
||||
```
|
||||
|
||||
|
||||
# 📚 Features
|
||||
### Basic Features
|
||||
- History (undo, redo)
|
||||
- Shortcuts
|
||||
- Right-click menu
|
||||
- Export local files (PPTX, JSON, images, PDF)
|
||||
- Import and export pptist files
|
||||
- Print
|
||||
### Slide Page Editing
|
||||
- Add/delete pages
|
||||
- Copy/paste pages
|
||||
- Adjust page order
|
||||
- Background settings (solid color, gradient, image)
|
||||
- Set canvas size
|
||||
- Gridlines
|
||||
- Rulers
|
||||
- Canvas zoom and move
|
||||
- Theme settings
|
||||
- Speaker notes (rich text)
|
||||
- Slide templates
|
||||
- Transition animations
|
||||
- Element animations (entrance, exit, emphasis)
|
||||
- Selection panel (hide elements, layer sorting, element naming)
|
||||
- Find/replace
|
||||
- Annotations
|
||||
### Slide Element Editing
|
||||
- Add/delete elements
|
||||
- Copy/paste elements
|
||||
- Drag and move elements
|
||||
- Rotate elements
|
||||
- Scale elements
|
||||
- Multiple element selection (marquee, point selection)
|
||||
- Group multiple elements
|
||||
- Batch edit multiple elements
|
||||
- Lock elements
|
||||
- Magnetic alignment of elements (move and scale)
|
||||
- Adjust element layer
|
||||
- Align elements to canvas
|
||||
- Align elements to other elements
|
||||
- Evenly distribute multiple elements
|
||||
- Drag to add text and images
|
||||
- Paste external images
|
||||
- Set element coordinates, size, and rotation
|
||||
- Element hyperlinks (link to webpage, link to other slide pages)
|
||||
#### Text
|
||||
- Rich text editing (color, highlight, font, font size, bold, italic, underline, strikethrough, subscript, inline code, quote, hyperlink, alignment, numbering, bullet points, paragraph indent, clear formatting)
|
||||
- Line height
|
||||
- Character spacing
|
||||
- Paragraph spacing
|
||||
- First line indent
|
||||
- Fill color
|
||||
- Border
|
||||
- Shadow
|
||||
- Transparency
|
||||
- Vertical text
|
||||
#### Images
|
||||
- Crop (custom, shape, aspect ratio)
|
||||
- Filters
|
||||
- Tint (mask)
|
||||
- Flip
|
||||
- Border
|
||||
- Shadow
|
||||
- Replace image
|
||||
- Reset image
|
||||
- Set as background
|
||||
#### Shapes
|
||||
- Draw any polygon
|
||||
- Draw any line (unclosed shape simulation)
|
||||
- Replace shape
|
||||
- Fill color
|
||||
- Border
|
||||
- Shadow
|
||||
- Transparency
|
||||
- Flip
|
||||
- Shape format painter
|
||||
- Edit text (supports rich text, similar to text element’s rich text editing)
|
||||
#### Lines
|
||||
- Color
|
||||
- Width
|
||||
- Style
|
||||
- Endpoint style
|
||||
#### Charts (bar, column, line, area, scatter, pie, donut)
|
||||
- Chart conversion
|
||||
- Data editing
|
||||
- Background fill
|
||||
- Theme color
|
||||
- Coordinate system and axis text color
|
||||
- Other chart settings
|
||||
- Border
|
||||
- Legend
|
||||
#### Tables
|
||||
- Add/delete rows and columns
|
||||
- Theme settings (theme color, header, total row, first column, last column)
|
||||
- Merge cells
|
||||
- Cell styles (fill color, text color, bold, italic, underline, strikethrough, alignment)
|
||||
- Border
|
||||
#### Video
|
||||
- Preview cover settings
|
||||
- Auto play
|
||||
#### Audio
|
||||
- Icon color
|
||||
- Auto play
|
||||
- Loop play
|
||||
#### Formulas
|
||||
- LaTeX editing
|
||||
- Color settings
|
||||
- Formula line thickness settings
|
||||
### Slide Show
|
||||
- Preview all slides
|
||||
- Pen and blackboard tools
|
||||
- Timer tool
|
||||
- Laser pointer
|
||||
- Auto play
|
||||
- Speaker view
|
||||
### Mobile
|
||||
- Basic editing
|
||||
- Add/delete/copy/note/undo redo pages
|
||||
- Insert text, images, rectangles, circles
|
||||
- General element operations: move, scale, rotate, copy, delete, layer adjust, align
|
||||
- Element styles: text (bold, italic, underline, strikethrough, font size, color, alignment), fill color
|
||||
- Basic preview
|
||||
- Play preview
|
||||
|
||||
|
||||
# FAQ
|
||||
[FAQ](/doc/Q&A.md)
|
||||
|
||||
|
||||
# 🎯 Supplement
|
||||
There is currently no complete development documentation, but the following documents may be of some help to you:
|
||||
- [Project Directory and Data Structure](https://github.com/pipipi-pikachu/PPTist/blob/master/doc/DirectoryAndData.md)
|
||||
- [Fundamentals of Canvas and Elements](https://github.com/pipipi-pikachu/PPTist/blob/master/doc/Canvas.md)
|
||||
- [How to Customize an Element](https://github.com/pipipi-pikachu/PPTist/blob/master/doc/CustomElement.md)
|
||||
|
||||
|
||||
# 📄 License
|
||||
[AGPL-3.0 License](https://github.com/pipipi-pikachu/PPTist/blob/master/LICENSE) | Copyright © 2020-PRESENT [pipipi-pikachu](https://github.com/pipipi-pikachu)
|
||||
|
||||
# 🧮 Commercial
|
||||
If you wish to use this project for commercial gain, I hope you will respect open source and strictly adhere to the AGPL-3.0 license, giving back to the open source community.
|
@ -3,6 +3,8 @@
|
||||
我们以【网页元素】为例,来梳理下自定义一个元素的过程。
|
||||
> 完整代码在 https://github.com/pipipi-pikachu/PPTist/tree/document-demo
|
||||
|
||||
> 注意:由于版本更新,该文档和仓库中的代码并不是直接复制粘贴就可以使用,这里仅提供思路。
|
||||
|
||||
### 编写新元素的结构与配置
|
||||
首先需要定义这个元素的结构,并添加该元素类型
|
||||
```typescript
|
||||
|
81
doc/Q&A.md
81
doc/Q&A.md
@ -62,6 +62,85 @@ A. 首先需要明确的一点,就是移动端无论怎么做,体验上都
|
||||
|
||||
A. 本项目优先兼容Chrome、Firefox。在Safari下可能存在部分兼容性问题。不兼容IE。
|
||||
|
||||
#### Q. 为什么不是NPM包?
|
||||
|
||||
A. 大家都知道,对于一般的插件/库而言,一个封装好的npm包能够更方便的接入现有的项目中,但PPTist是特殊的,这是一个完整的程序,而不是作为程序的一部分存在。如果你需要使用PPTist,那么我认为你必然需要在此基础上做很多定制化的开发,包括但不限于:与后台的通信、各种模板和预置素材、新的元素类型、使用其他方案实现现有的某些元素、自己的主题、更换快捷键,等等……而不是仅仅安装一个和现有demo一样的东西就行了(这样虽然方便,但在实际的产品开发中没有任何意义)。正如前面所列举的,需要可配置的东西太多了,如果作为一个插件的存在,很难兼顾得了,或者说这样做的开发量是巨大的,目前个人还承担不起。
|
||||
|
||||
因此,使用PPTist开发项目正确的做法是:拉取完整的代码、尝试理解它、基于它改造你自己的东西。社区中也不乏类似的项目,例如 [drawio](https://github.com/jgraph/drawio)
|
||||
|
||||
#### Q. 其他
|
||||
|
||||
A. 另外,还是没有后台的缘故(没有多余的钱去买服务器或云服务),一些功能我是刻意砍掉的,哪怕这些功能其实很基础,例如上传音视频、例如自定义模板。还有一些功能明明有更好的实现方案,我却没有选择,例如导出PDF。这些需要依靠开发者们自己去实现和完善了。
|
||||
A. 另外,还是没有后台的缘故(没有多余的钱去买服务器或云服务),一些功能我是刻意砍掉的,哪怕这些功能其实很基础,例如上传音视频、例如自定义模板。还有一些功能明明有更好的实现方案,我却没有选择,例如导出PDF。这些需要依靠开发者们自己去实现和完善了。
|
||||
|
||||
## FAQ
|
||||
#### Q. Why doesn’t the xxx shortcut work?
|
||||
|
||||
A. Some shortcuts only work when the focus is on a specific area. For example, the shortcuts for operating pages only work when the focus is on the thumbnail list on the left, and the shortcuts for operating elements only work when the focus is on the canvas area.
|
||||
|
||||
#### Q. Why isn’t pasting working?
|
||||
|
||||
A. Please make sure to allow the browser access to the system clipboard.
|
||||
|
||||
#### Q. Why do my previous PPT disappear after refreshing or reopening the browser?
|
||||
|
||||
A. The links provided by the repository are for demonstration purposes only, and the project is deployed as a pure front-end application without a backend, thus it does not save data.
|
||||
|
||||
#### Q. How do I adjust the order of slides?
|
||||
|
||||
A. You can drag and drop the thumbnails on the left to adjust the order.
|
||||
|
||||
#### Q. Why does the application become unresponsive after inserting images?
|
||||
|
||||
A. Since this demo project does not rely on a backend, inserting local images actually references Base64 encoded data, which can result in very large data sizes. In a real production environment, you should upload images and reference their addresses to avoid this issue.
|
||||
|
||||
#### Q. Why doesn’t the preset theme take effect after being applied?
|
||||
|
||||
A. Applying a preset theme affects new elements and pages added, but will not apply to existing elements and pages. You can use the “Apply Theme to All” feature to apply the current theme to all pages.
|
||||
|
||||
#### Q. Why doesn’t setting an online font work?
|
||||
|
||||
A. Setting an online font involves downloading the corresponding font file, which can be large and requires time to complete the download before the new font is applied.
|
||||
|
||||
#### Q. About Importing and Exporting PPTX Files
|
||||
|
||||
A. As an online presentation application, the ability to import and export PPTX files is very important. However, it has been found that the complexity of implementing this feature far exceeds expectations. Due to limited personal capacity and time, this functionality can only be achieved with the help of third-party solutions.
|
||||
|
||||
Export: The current export function is mainly based on [PptxGenJS](https://github.com/gitbrent/PptxGenJS/), and it can export most basic elements, but there are still many defects that need to be improved. It’s important to note that: 1) This feature relies on PptxGenJS, and for parts that the library itself cannot implement (such as animations), there’s nothing this project can do; 2) The goal of the export function is to export elements with styles as consistent as possible, not to recreate the web page one-to-one in PPT, and some style differences are inevitable.
|
||||
|
||||
Import: The import function currently does not have a suitable solution and is still under investigation. If you are interested or have experience in related areas, please discuss in the issues.
|
||||
|
||||
> PS. I made an experimental [pptx to json](https://github.com/pipipi-pikachu/pptx2json) converter. If you urgently need to implement the import PPTX file function, you can use this as a reference for your own implementation.
|
||||
|
||||
It should be noted that this project is not an exclusive online editor for Office PPT. It is essentially unrelated to Office PPT. The [import/export of PPT files] is just a [feature] of the project, not its [purpose].
|
||||
|
||||
#### Q. Which video formats are supported?
|
||||
|
||||
A. This project only provides basic video capabilities and can play formats supported by the video tag in normal conditions.
|
||||
|
||||
Additionally, you can introduce [hls.js](https://github.com/video-dev/hls.js) or [flv.js](https://github.com/Bilibili/flv.js) to support corresponding formats (.m3u8 .flv) by simply including the corresponding files (such as CDN) in your project, without any other configuration required.
|
||||
|
||||
#### Q. About Importing JSON Files
|
||||
|
||||
A. Firstly, due to security reasons, I do not recommend exposing such functionality directly to users on the front end, or users should not even come into contact with formats like JSON in the first place (even the export JSON feature was initially intended only for development convenience). If there is a real need, please implement it on the server side, with a focus on data validation, and the same goes for the front end.
|
||||
|
||||
#### Q. Print / Export PDF Styles Are Different from the Actual
|
||||
|
||||
A. Please adjust the settings in the print dialog that pops up in the browser. It is recommended to set the margins to [default], uncheck [headers and footers], and check [background graphics].
|
||||
|
||||
#### Q. Why doesn’t the mobile version support xxx feature?
|
||||
|
||||
A. The first thing to clarify is that the mobile experience will inevitably be inferior to the PC experience no matter what. Therefore, the mobile version is positioned for simple, temporary handling in emergency situations. True design and creation of slides should be done on a computer with full functionality. If there is a specific need for the mobile version, you can try opening it in desktop mode on mobile (of course, the experience will be worse), or the developer can do further custom development.
|
||||
|
||||
#### Q. About Compatibility?
|
||||
|
||||
A. This project prioritizes compatibility with Chrome and Firefox. There may be some compatibility issues under Safari. It is not compatible with IE.
|
||||
|
||||
#### Q. Why isn’t it an NPM package?
|
||||
|
||||
A. Everyone knows that for general plugins/libraries, a well-packaged NPM package can more easily integrate into existing projects. However, PPTist is special; it is a complete program, not a part of another program. If you need to use PPTist, I believe you will necessarily need to do a lot of custom development based on it, including but not limited to: communication with the backend, various templates and pre-installed materials, new element types, using other solutions to implement certain existing elements, your own themes, changing shortcuts, and so on… It’s not just about installing something that is the same as the existing demo (which may be convenient but has no practical significance in actual product development). As previously mentioned, there are many things that need to be configurable, and it would be difficult to cater to all these needs if it were an NPM plugin. The development effort would be enormous, and currently, I cannot afford it.
|
||||
|
||||
Therefore, the correct way to develop a project using PPTist is to pull the complete code, try to understand it, and modify it to suit your own needs. There are also similar projects in the community, such as [drawio](https://github.com/jgraph/drawio).
|
||||
|
||||
#### Q. Other
|
||||
|
||||
A. Additionally, due to the absence of a backend (and no extra money to buy servers or cloud services), some features are deliberately omitted, even though they are quite basic, such as uploading audio and video, or custom templates. There are also features that have better implementation options, but I have not chosen them, such as exporting to PDF. These will need to be implemented and improved by developers.
|
||||
|
Loading…
x
Reference in New Issue
Block a user