MCPcopy Index your code
hub / github.com/ctripcorp/tripdocs

github.com/ctripcorp/tripdocs @1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.0.0 ↗ · + Follow
2,204 symbols 6,193 edges 332 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

logo TripDocsSDK is an application framework for Slate and React to make it easier to build modern rich text editors.

TripDocsSDK | 中文版

Introduction

  • TripDocsSDK is based on Ctrip internal rich text editors kernel, refining a general, modern, stable, collaborative, and can be used for production modern rich text editors.

  • At present, TripDocsSDK has integrated TripDocs system and Trippal briefing system, and iDev system is being connected. In TripDocs system, it has been running for more than 1 year and has accumulated 2000+ documents.

  • TripDocsSDK relies on slatejs, yjs and reactjs. And on the basis of slatejs, the second development includes a lot of components and a large number of error correction mechanism, making the editor more stable and reliable.

Features

  • Support for NPM package import and CDN import.

  • Provides a large number of regular plugins, on-demand selection, plug and play, without additional development costs.

  • Solutions for a lot of crashes.

  • Markdown editing and word parsing.

Screenshot

Screenshot

Development

# Install
npm install

# start up
npm run dev

# run 

# The startup will listen to ports 3001 and 5385

# visit

http://127.0.0.1:3001/

Production



# Build the npm package
npm run buildPC 

or

# Build the cdn package
npm run buildNpm 



Plugings

  • [x] Undo/Redo
  • [x] Font size
  • [x] Font color
  • [x] Bold
  • [x] Italic
  • [x] Strikethrough
  • [x] Underline
  • [x] Alignment
  • [x] Unordered list
  • [x] Ordered list
  • [x] Task list
  • [x] Ident
  • [x] Link
  • [x] Reference
  • [x] Codeblock
  • [x] Text and Title
  • [x] Table
  • [x] Horizontal line
  • [x] Clear Format
  • [x] Format brush
  • [x] Toolbar
  • [x] TOC
  • [x] Shortcut key
  • [ ] Superscript
  • [ ] Subscript
  • [ ] Media - Pictures
  • [ ] Media - Video
  • [ ] Media - Audio
  • [ ] Emoji

Thanks

Thanks for all these great efforts making this project better.

  • Yjs & Yrs -- Fundamental support of CRDTs for our implementation on state management and data sync.
  • React -- View layer support and web GUI framework.
  • slatejs -- Customizable rich-text editor.
  • antd -- Help designers/developers building beautiful products more flexible and working with happiness
  • @emotion -- Emotion is a library designed for writing css styles with JavaScript.
  • @codemirror -- CodeMirror is a code editor component for the web.
  • html2pdf -- html2pdf.js converts any webpage or element into a printable PDF entirely client-side using html2canvas and jsPDF.
  • prismjs -- Lightweight, robust, elegant syntax highlighting.

Licence

MIT

Extension points exported contracts — how you extend this code

CustomTypes (Interface)
(no doc)
custom-types.d.ts
TNode (Interface)
(no doc)
slate.d.ts
Options (Interface)
(no doc)
global.d.ts
commentDataType (Interface)
(no doc)
src/Docs.tsx
IMDEditorProps (Interface)
(no doc)
src/components/MdEditor/index.tsx
ELEMENTNODE (Interface)
(no doc)
src/utils/normalize.ts
Tripdocs (Interface)
(no doc)
global.d.ts
ModalProps (Interface)
(no doc)
src/components/app/Modal/index.tsx

Core symbols most depended-on inside this repo

f
called by 233
src/resource/string.ts
S
called by 230
public/cdn/index.js
n
called by 162
public/cdn/index.js
apply
called by 150
src/worker/webpackPlugins/ToInlineBlobWorkerPlugin.js
h
called by 132
public/cdn/index.js
getCache
called by 129
src/utils/cacheUtils.ts
a
called by 97
public/cdn/index.js
l
called by 75
public/cdn/index.js

Shape

Function 2,054
Interface 115
Method 17
Class 14
Enum 4

Languages

TypeScript100%

Modules by API surface

public/cdn/index.js787 symbols
src/components/slate-packages/slate/interfaces/editor.ts60 symbols
src/components/docs/plugins/InlineImage/inlineImagePlugins.tsx47 symbols
src/components/docs/plugins/Image/imagePlugins.tsx40 symbols
src/components/docs/plugins/transformers/models/mdast.ts36 symbols
src/components/docs/slateEditor.tsx33 symbols
src/components/docs/plugins/transformers/mdast-to-slate.ts31 symbols
src/components/docs/plugins/transformers/slate-to-mdast.ts30 symbols
src/components/slate-packages/slate-react/plugin/react-editor.ts29 symbols
src/components/slate-packages/slate/interfaces/path.ts24 symbols
src/components/slate-packages/slate/interfaces/node.ts24 symbols
src/components/docs/plugins/StaticToolbar/buttons.tsx20 symbols

For agents

$ claude mcp add tripdocs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact