sofish / pen
enjoy live editing (+markdown)
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing sofish/pen in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewPen Editor • **LIVE DEMO:** http://sofish.github.io/pen • **Markdown is supported** • **Build status:** ****************** ****************** • source code You can clone the source code from github, or using bower. • installation 1.1 init with id attribute 1.2 init with an element 1.3 init with options • configure The following object sets up the default settings of Pen: If you want to customize the toolbar to fit your own project, you can instanciate constructor with an object like #1.3: init with options: 2.1 Fallback for old browser You can set to a piece of HTML string, by default, it's 。This will be set as of your . 2.2 Change the editor class Pen will add to your editor by default, if you want to change the class, make sure to replace the class name to your own in . 2.3 Enable debug mode If is set to , Pen will output logs to the Console of your browser. 2.4 Customize the toolbar You can set to an , add the following strings to make your own: • , , , , : create a tag as its literal meaning • : create an list • : create a list • : indent list / blockquote block • : outdent list / blockquote block • : wrap the text selection in a tag • : wrap the text selection in an tag • : wrap the text selection in a tag • : insert link to the text selection • : insert a tag • : insert an image ( ) tag 2.5 Add tooltips to the toolbar icons You can set to an object with properties that match the toolbar actions. The value of each property will be used as the title attribute on the icon. Most browsers will display the title attribute as a tooltip when the mouse hovers over the icon. If you are using Bootstrap or jQueryUI, you can standardize the tooltip style by adding to your JavaScript. 2.6 Prevent unsafe page redirect By default, Pen will prevent unsafe page redirect when editing, to shut down it, specific to . __NOTE:__ if is set to and is not set: . 2.7 Disable and Re-enable editor You can disable the pen editor by call method of the object. like: And, there's a corresponding method called to re-enable the editor: 2.8 Export content as markdown It's an experimental feature • markdown syntax support 3.1 install The syntax convertor will be enabled automatically by linking after action cmd space key # - * 1. \ ** • Block Quote: type • Horizontal Rule: more than 3 , , will create a , like • license Licensed under MIT. • trusted by *