32 Star 431 Fork 76

豆萁/stackedit

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README
Apache-2.0


StackEdit中文版

笔记利器,在线Markdown编辑器。
如果你喜欢该项目,请点一下Star,您的肯定是作者最大的动力!

https://stackedit.cn

Apache 2 Docker Pulls gitee star



1 笔记支持Gitee、GitHub、Gitea等Git仓库存储。
2 支持直接上传图片,也支持多种外部图床(GitHub、Gitea、SM.MS、自定义图床)粘贴或拖拽上传。
3 编辑区域支持选择主题或自定义,总有你喜欢的主题。
4 支持历史版本管理,不用担心编辑覆盖后无法回滚。
5 支持ChatGPT辅助写作。
6 支持KaTeX数学表达式、Mermaid UML图、乐谱等扩展。

截图

亮暗主题切换、编辑主题切换

支持的文档空间

拖拽粘贴上传图片

支持文档搜索

ChatGPT集成协助写作

相比国外开源版本的区别:

  • 修复了Github授权登录问题
  • 支持了Gitee仓库(2022-05-25)
  • 支持了Gitea仓库(2022-05-25)
  • 汉化(2022-06-01)
  • 主文档空间从GoogleDrive切换为Gitee(2022-06-04)
  • 支持SM.MS图床粘贴/拖拽图片自动上传(2022-07-01)
  • 支持Gitea图床粘贴/拖拽图片自动上传(2022-07-02)
  • 支持自定义图床粘贴/拖拽图片自动上传(2022-07-04)
  • 支持GitHub图床粘贴/拖拽图片自动上传(2022-07-31)
  • 支持了右上角一键切换主题,补全了深色主题的样式(2022-08-07)
  • 编辑与预览区域样式优化(2022-08-10)
  • 左边栏文件资源管理支持搜索文件(2022-08-17)
  • 支持[TOC]目录(2022-09-04)
  • 发布支持填写提交信息[针对Gitee、GitHub、Gitea、Gitlab](2022-09-10)
  • 支持文档空间关闭自动同步[针对Gitee、GitHub、Gitea、Gitlab],关闭后可自定义提交信息(2022-09-23)
  • Gitea支持后端配置指定应用ID和Secret(2022-10-03)
  • 支持编辑区域选择主题样式(2022-10-06)
  • 支持图片直接存储到当前文档空间(2022-10-29)
  • 支持MD文档之间链接跳转(2022-11-20)
  • 支持预览区域选择主题样式(2022-12-04)
  • Gitlab的支持优化(2023-02-23)
  • 导出HTML、PDF支持带预览主题导出(2023-02-26)
  • 支持分享文档(2023-03-30)
  • 支持ChatGPT生成内容(2023-04-10)
  • GitLab授权接口调整(2023-08-26)
  • 主文档空间支持GitHub登录(2023-10-19)

国外开源版本弊端:

  • 作者已经不维护了或很少维护了
  • 不支持国内常用Gitee
  • 强依赖GoogleDrive,而Google Drive在国内不能正常访问

部署说明

建议docker-compose方式部署,其他部署方式如遇到问题欢迎提issue。

docker官方仓库下载太慢可以使用阿里云的镜像仓库,镜像仓库地址:registry.cn-hangzhou.aliyuncs.com/mafgwo/stackedit:【版本号】

docker-compose.yml如下:

version: "3.7"
services:
  stackedit:
    image: mafgwo/stackedit:【docker中央仓库找到最新版本】
    container_name: stackedit
    environment:
      - LISTENING_PORT=8080
      - ROOT_URL=/
      - USER_BUCKET_NAME=root
      - DROPBOX_APP_KEY=【不需要支持则删掉】
      - DROPBOX_APP_KEY_FULL=【不需要支持则删掉】
      - GITHUB_CLIENT_ID=【不需要支持则删掉】
      - GITHUB_CLIENT_SECRET=【不需要支持则删掉】
      - GITEE_CLIENT_ID=【不需要支持则删掉】
      - GITEE_CLIENT_SECRET=【不需要支持则删掉】
      - GOOGLE_CLIENT_ID=【不需要支持则删掉】
      - GOOGLE_API_KEY=【不需要支持则删掉】
      - GITEA_CLIENT_ID=【不需要支持则删掉】
      - GITEA_CLIENT_SECRET=【不需要支持则删掉】
      - GITEA_URL=【不需要支持则删掉】
      - GITLAB_CLIENT_ID=【不需要支持则删掉】
      - GITLAB_CLIENT_SECRET=【不需要支持则删掉】
      - GITLAB_URL=【不需要支持则删掉】
    ports:
      - 8080:8080/tcp
    network_mode: bridge
    restart: always

docker-compose方式的启动或停止命令

# 在 docker-compose.yml 文件目录下 启动命令 
docker-compose up -d
# 在 docker-compose.yml 文件目录下 停止命令 
docker-compose down
# 更新镜像只需要修改docker-compose.yml中镜像版本执行再停止、启动命令即可

或者可以直接通过Docker命名直接启动,命令如下:

docker run -itd --name stackedit \
  -p 8080:8080 \
  -e LISTENING_PORT=8080 \
  -e ROOT_URL=/ \
  -e USER_BUCKET_NAME=root \
  -e DROPBOX_APP_KEY=【不需要支持则删掉】 \
  -e DROPBOX_APP_KEY_FULL=【不需要支持则删掉】 \
  -e GITHUB_CLIENT_ID=【不需要支持则删掉】 \
  -e GITHUB_CLIENT_SECRET=【不需要支持则删掉】 \
  -e GITEE_CLIENT_ID=【不需要支持则删掉】 \
  -e GITEE_CLIENT_SECRET=【不需要支持则删掉】 \
  -e GOOGLE_CLIENT_ID=【不需要支持则删掉】 \
  -e GOOGLE_API_KEY=【不需要支持则删掉】 \
  -e GITEA_CLIENT_ID=【不需要支持则删掉】 \
  -e GITEA_CLIENT_SECRET=【不需要支持则删掉】 \
  -e GITEA_URL=【不需要支持则删掉】 \
  -e GITLAB_CLIENT_ID=【不需要支持则删掉】 \
  -e GITLAB_CLIENT_SECRET=【不需要支持则删掉】 \
  -e GITLAB_URL=【不需要支持则删掉】 \
  mafgwo/stackedit:【docker中央仓库找到最新版本】

如何创建三方平台应用

部署时,如果需要支持Gitee或GitHub,则需要自行到对应三方平台创建应用,获取到应用ID和秘钥,替换到以上的环境变量中,再启动应用。

  • Gitee的环境变量:GITEE_CLIENT_ID、GITEE_CLIENT_SECRET,如何创建Gitee应用

  • GitHub的环境变量:GITHUB_CLIENT_ID、GITEE_CLIENT_SECRET,如何创建GitHub应用

  • Gitea可选择性配置环境变量(未配置则在关联时前端指定,有配置则仅允许配置的应用信息):GITEA_CLIENT_ID、GITEA_CLIENT_SECRET、GITEA_URL,如何创建Gitea应用

  • Gitlab可选择性配置环境变量(未配置则在关联时前端指定,有配置则仅允许配置的应用信息):GITLAB_CLIENT_ID、GITLAB_CLIENT_SECRET、GITLAB_URL 如何创建Gitlab应用(待补充文档)

(特别说明:自建的Gitea、Gitlab要能接入stackedit必须支持跨域)

编译与运行

编译运行的nodejs版本选择11.15.0版本

# 安装依赖
npm install

# serve with hot reload at localhost:8080
npm start

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

欢迎加群交流

关于StackEdit,如果你有想法,或者使用中遇到了问题,可以提Issue,如果需要快速得到反馈,可以加QQ群如下(加群后可直接@群主):

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

StackEdit中文版不仅是Markdown在线编辑工具,还是支持Gitee、GitHub、Gitea等仓库保存Markdown笔记的在线笔记工具,另外还支持了拖拽/粘贴上传图片,支持了文件搜索,支持切换为炫酷的暗黑主题等易用功能,非常适合喜欢用Markdown写笔记的朋友。 expand collapse
JavaScript and 6 more languages
Apache-2.0
Cancel

Releases (3)

All

Contributors

All

Activities

Load More
can not load any more
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mafgwo/stackedit.git
git@gitee.com:mafgwo/stackedit.git
mafgwo
stackedit
stackedit
master

Search

344bd9b3 5694891 D2dac590 5694891