Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

Plait logo and name

Total Downloads

A modern drawing framework for building an all-in-one whiteboard tool
for interactive drawing features such as mind maps, flowcharts, and freehand drawing.

Plait is a modern drawing framework that provides a plugin mechanism, allowing developers to extend drawing functionalities through plugins. It is particularly suitable for the development of interactive whiteboard tools.

Plait does not rely on any frontend UI framework at its core, but it provides solutions for integrating with mainstream frontend UI frameworks to ensure a good development experience for upper-layer developers and to reuse mainstream framework components.

中文文档

Plait will also provide some basic functional plugins, which have been implemented so far:

  • Mind plugin

  • Draw plugin

  • GraphViz plugin

  • Flow plugin

online demo screen

Features

  • Independent of UI frameworks
  • Provides basic board capabilities, such as zooming in, zooming out, and moving
  • Plugin mechanism
  • Data model (supports collaboration)
  • Basic drawing utility functions

UI Framework Integration

The implementation of the framework requires components from frontend UI frameworks as carriers. This ensures that the development of drawing functionalities follows mainstream development patterns (data-driven). Currently, integration with Angular and React frameworks is supported.

Text rendering in the plait is based on the Slate framework, enabling rich text rendering and editing on the board. Slate is an excellent rich text editor framework, and Plait was inspired by the Slate framework in its design

Packages

Package NameDescription
@plait/coreFramework core: plugin mechanism design, providing data models, data transformation functions, zooming, scrolling, etc
@plait/commonCommon functionalities for interactive drawing, text rendering, and editing
@plait/text-pluginsGeneral text extension functionalities, UI framework-independent, relies on the Slate rich text editor framework
@plait/mindMind map plugin, based on an independent automatic layout algorithm, supports: logical layout, standard layout, indent layout
@plait/drawFlowchart plugin, supports: basic shapes, flowchart shapes, connections, free images, etc
@plait/flowProcess orchestration plugin, supports: standard nodes, connections, custom nodes, and connections
@plait/graph-vizgraph visualization,supports: force atlas(Knowledge graph)
@plait/layoutsMind map layout algorithms
@plait/angular-textText rendering component, relies on the Angular framework, Slate rich text editor framework, Angular view layer
@plait/angular-boardWhiteboard view layer component, relies on the Angular framework
@plait/react-textText rendering component, relies on the React framework, Slate rich text editor framework, React view layer
@plait/react-boardWhiteboard view layer component, relies on the React framework

React view layer, text rendering component:https://github.com/plait-board/drawnix

Who is using

Development

npm i

npm run build

npm run start

Usage

Basic usage (integrated @plait/mind plugin)

HTML:

<plait-board [plaitPlugins]="plugins" [plaitValue]="value"
    (initialized)="initialized($event)" (change)="change($event)">
</plait-board>

TS:

// .ts
@Component({
  selector: 'board-basic',
  templateUrl: './board-basic.component.html',
  host: {
    class: 'board-basic-container',
  },
})
export class BasicBoardComponent {
  plugins = [withMind];

  value: PlaitElement[] = demoData;

  board!: PlaitBoard;

  change(event: OnChangeData) {
    // console.log(event.children);
  }

  initialized(value: PlaitBoard) {
    this.board = value;
  }
}

For more detailed examples refer to: https://github.com/pubuzhixing8/plait-basic

Thanks

Contributing

Everyone is welcome to contribute to Plait and build a new generation of drawing framework together. Any Issue or PR is acceptable, and we hope to get your ⭐️ support.

LICENSE

MIT License

关于 About

A completely customizable framework for building all-in-one drawing whiteboard
angularbrowserdiagramsdrawingframeworkjavascriptplaitpluginswhiteboard

语言 Languages

TypeScript87.1%
HTML10.3%
SCSS1.8%
JavaScript0.8%
Shell0.0%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
111
Total Commits
峰值: 12次/周
Less
More

核心贡献者 Contributors