# madebymany/sir-trevor-js

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/madebymany-sir-trevor-js).**

4,483 stars · 383 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/madebymany/sir-trevor-js
- Homepage: http://madebymany.github.io/sir-trevor-js/
- awesome-repositories: https://awesome-repositories.com/repository/madebymany-sir-trevor-js.md

## Description

sir-trevor-js is a modular block-based rich text editor and content framework. It functions as a customizable WYSIWYG editor that transforms visual input into a structured JSON content framework, storing documents as a tree of independent data blocks rather than flat HTML strings.

The system is distinguished by its focus on structured content management, allowing users to define custom block types, set block constraints, and implement schema-based content validation. It provides a plugin system for extending the editor with specialized content types and uses event-driven lifecycle hooks to execute custom functions during the block rendering process.

The editor includes capabilities for rich text formatting, drag-and-drop block reordering, and media asset uploads via AJAX. It also supports the integration of external content through oEmbed and iframes to embed third-party media and API data directly into the document structure.

## Tags

### Content Management & Publishing

- [Block-Based Document Models](https://awesome-repositories.com/f/content-management-publishing/content-management-systems/content-architecture-modeling/document-architectures/block-based-document-models.md) — Stores documents as a structured tree of independent, nestable JSON data blocks.
- [Modular Authoring Workflows](https://awesome-repositories.com/f/content-management-publishing/cms-frameworks/modular-authoring-workflows.md) — Provides a structured workflow for creating and organizing content as a sequence of independent, reorderable blocks.
- [Custom Block Type Definitions](https://awesome-repositories.com/f/content-management-publishing/content-management-systems/content-architecture-modeling/document-models/document-sectioning/document-content-structuring/content-schema-definitions/modular-content-block-definitions/custom-block-type-definitions.md) — Allows defining the structure, data schema, and interactive elements for new custom block types. ([source](https://cdn.jsdelivr.net/gh/madebymany/sir-trevor-js@master/README.md))
- [Schema Validators](https://awesome-repositories.com/f/content-management-publishing/content-management-systems/content-architecture-modeling/document-models/document-sectioning/document-content-structuring/schema-validators.md) — Validates document nodes and block attributes against defined schema rules before saving content.
- [Agnostic Content Generation](https://awesome-repositories.com/f/content-management-publishing/content-management-systems/content-architecture-modeling/document-models/document-sectioning/document-content-structuring/stylesheet-content-structuring/agnostic-content-generation.md) — Produces structured content blocks stripped of presentational styling to ensure data remains agnostic of the output format. ([source](https://github.com/madebymany/sir-trevor-js/wiki/Philosophy))
- [JSON Content Frameworks](https://awesome-repositories.com/f/content-management-publishing/json-content-frameworks.md) — Implements a system for defining custom content types and constraints stored in a platform-agnostic JSON format.
- [JSON Document Authoring](https://awesome-repositories.com/f/content-management-publishing/saved-content-blocks/json-document-authoring.md) — Enables the creation of modular documents stored as platform-agnostic JSON to separate content from final presentation.
- [Structured Content Managers](https://awesome-repositories.com/f/content-management-publishing/structured-content-managers.md) — Provides a tool for organizing media, embeds, and text into independent blocks with drag-and-drop reordering.
- [External Media Frames](https://awesome-repositories.com/f/content-management-publishing/content-management-systems/content-architecture-modeling/documentation-standards/media-embedding/external-media-frames.md) — Embeds third-party videos, audio, and presentations into the editor using oEmbed or iFrames. ([source](https://github.com/madebymany/sir-trevor-js/wiki/Custom-blocks))
- [External Content Integrations](https://awesome-repositories.com/f/content-management-publishing/external-content-integrations.md) — Integrates third-party content sources and social media posts into a unified management interface. ([source](http://madebymany.github.io/sir-trevor-js/docs.html))

### User Interface & Experience

- [Block-Based Editors](https://awesome-repositories.com/f/user-interface-experience/rich-text-wysiwyg-editors/block-based-editors.md) — Provides a modular WYSIWYG editor that stores structured content as JSON blocks instead of flat HTML. ([source](http://madebymany.github.io/sir-trevor-js/docs.html))
- [Custom Block Definitions](https://awesome-repositories.com/f/user-interface-experience/content-block-editors/custom-block-definitions.md) — Allows developers to define new block schemas and UI components to handle unique data structures.
- [Custom Block Frameworks](https://awesome-repositories.com/f/user-interface-experience/custom-component-extensions/editor-extension-creations/custom-block-frameworks.md) — Offers a framework for extending the editor with new content types that support media uploads and remote data. ([source](http://madebymany.github.io/sir-trevor-js/docs.html))
- [Rich Text Formatting Extensions](https://awesome-repositories.com/f/user-interface-experience/rich-text-editors/rich-text-formatting-extensions.md) — Includes a customizable rich text system with plugin support for consistent cross-browser formatting. ([source](http://madebymany.github.io/sir-trevor-js/docs.html))
- [Rich Text WYSIWYG Editors](https://awesome-repositories.com/f/user-interface-experience/rich-text-wysiwyg-editors.md) — Ships a customizable visual editor for formatted text and media with a plugin system for custom blocks.
- [Block Constraint Extensions](https://awesome-repositories.com/f/user-interface-experience/block-constraint-extensions.md) — Includes a configuration system to set limits on the number and types of blocks allowed within a document. ([source](http://madebymany.github.io/sir-trevor-js/docs.html))
- [Content Embedding Tools](https://awesome-repositories.com/f/user-interface-experience/content-embedding-tools.md) — Integrates external web content and API data into the editor via secure, configurable containers.
- [Drag-and-Drop Row Reorderers](https://awesome-repositories.com/f/user-interface-experience/drag-and-drop-row-reorderers.md) — Allows users to manually rearrange the sequence of content blocks via drag-and-drop interactions.
- [oEmbed Providers](https://awesome-repositories.com/f/user-interface-experience/media-embeds/oembed-providers.md) — Fetches metadata from external providers via the oEmbed protocol to render embedded media previews.
- [Media Uploaders](https://awesome-repositories.com/f/user-interface-experience/media-uploaders.md) — Ships a UI system for the selection, upload, and insertion of media files into content blocks. ([source](http://madebymany.github.io/sir-trevor-js/docs.html))

### Software Engineering & Architecture

- [Lifecycle Event Hooks](https://awesome-repositories.com/f/software-engineering-architecture/lifecycle-event-hooks.md) — Triggers custom functions at specific stages of the block rendering process to manipulate data or behavior.
- [Content Block Architectures](https://awesome-repositories.com/f/software-engineering-architecture/modular-architectures/modular-state-architectures/content-block-architectures.md) — Separates content types into independent components with their own data schemas, rendering logic, and validation rules.

### Web Development

- [Rich Text Editors](https://awesome-repositories.com/f/web-development/rich-text-editors.md) — Implements a web-based interface for creating formatted content using a structured document model.
- [Block Rendering Hooks](https://awesome-repositories.com/f/web-development/editor-content-commands/block-rendering-hooks.md) — Implements an event-driven system to execute custom functions immediately before or after a block renders. ([source](http://madebymany.github.io/sir-trevor-js/docs.html))
- [Rich Media Insertions](https://awesome-repositories.com/f/web-development/editor-insertion-commands/table-insertion/rich-media-insertions.md) — Provides commands for inserting images and code snippets with supporting metadata like captions and credits. ([source](https://github.com/madebymany/sir-trevor-js/wiki/Custom-blocks))

### Data & Databases

- [Custom Field Validation](https://awesome-repositories.com/f/data-databases/custom-data-fields/custom-field-validation.md) — Provides validation logic to ensure required fields are present in content blocks before saving. ([source](http://madebymany.github.io/sir-trevor-js/docs.html))

### Networking & Communication

- [Asynchronous Media Uploads](https://awesome-repositories.com/f/networking-communication/upload-progress-tracking/progress-tracked-uploads/background-media-uploads/asynchronous-media-uploads.md) — Implements a background AJAX upload system to send media files to a server without interrupting the editing process.

### Part of an Awesome List

- [Advanced Editors](https://awesome-repositories.com/f/awesome-lists/devtools/advanced-editors.md) — Re-imagined rich content editing for the web.
