From 0f0ccaf1c41fbefa8d52c4d67df0f3f69a7dba43 Mon Sep 17 00:00:00 2001 From: Vamshi Kiran alugulla Date: Wed, 18 Mar 2026 21:13:11 +0530 Subject: [PATCH] Improve README clarity, fix grammar, and enhance structure ## Overview This PR improves the README by refining wording, fixing grammar issues, and enhancing overall structure. ## Changes Made - Improved project description and overview - Fixed grammar and spelling issues - Updated installation instructions - Improved usage example formatting - Enhanced data format documentation - Standardized headings and formatting ## Why is this change needed? These improvements make the documentation more clear, professional, and easier to understand for users and contributors. Please let me know if any further improvements are needed! --- readme.md | 93 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 52 insertions(+), 41 deletions(-) diff --git a/readme.md b/readme.md index a4dc9b4..aa53552 100644 --- a/readme.md +++ b/readme.md @@ -1,83 +1,94 @@ -# EditorJs - Codeflask +# EditorJS CodeFlask -### NPM - npm i @calumk/editorjs-codeflask +An EditorJS tool that integrates [CodeFlask](https://kazzkiq.github.io/CodeFlask/) — a lightweight, zero-dependency code editor — for enhanced code editing within EditorJS. -### JS - https://cdn.jsdelivr.net/npm/@calumk/editorjs-nested-checklist@latest +--- + +## Installation + +### Using NPM + +```bash +npm install @calumk/editorjs-codeflask +``` + +### Using CDN + +```html +https://cdn.jsdelivr.net/npm/@calumk/editorjs-codeflask@latest +``` --- -## About +## Overview -This is an EditorJs wrapper for [CodeFlask](https://kazzkiq.github.io/CodeFlask/) - A lovely lightweight zero-dep code formatter +This plugin is a wrapper around CodeFlask, designed to provide a better code editing experience in EditorJS compared to existing solutions. -It was built to be an improvement on : -* https://github.com/editor-js/code - Too Basic -* https://github.com/dev-juju/codebox - Agressive styling, and exports more data than markdown can handle +It improves upon: +* https://github.com/editor-js/code — Too basic +* https://github.com/dev-juju/codebox — Aggressive styling and excessive data output + +--- ## Demo -![Demo ](./example-media/editorjs-codeflask-demo.gif) +![Demo](./example-media/editorjs-codeflask-demo.gif) +--- -## Built with: +## Built With * [CodeFlask](https://kazzkiq.github.io/CodeFlask/) -* [Prism](https://www.npmjs.com/package/prismjs) +* [PrismJS](https://www.npmjs.com/package/prismjs) * [Prism ESM Importer](https://www.npmjs.com/package/prismjs-components-importer) * [Nice Select 2](https://www.npmjs.com/package/nice-select2) - --- -## Installation / use +## Usage ```javascript import EditorJS from '@editorjs/editorjs'; -import editorjsCodeflask from '@calumk/editorjs-codeflask'; +import EditorjsCodeflask from '@calumk/editorjs-codeflask'; -var editor = EditorJS({ - // ... +const editor = new EditorJS({ tools: { - ... - code : editorjsCodeflask - }, + code: EditorjsCodeflask + } }); ``` +--- ## Data Format -The data imported/exported from the block is as follows: -| Name | Description | -| -------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| code | The code that is displayed in the editor, with line breaks | -| language (optional) | The programming language | -| showlinenumbers (optional) | Will show/hide the line numbers (Default true) (WIP - [Codeflask #132](https://github.com/kazzkiq/CodeFlask/issues/132)) | +The data imported/exported from the block is structured as follows: +| Field | Description | +| ------------------- | -------------------------------------------------------------- | +| code | The code displayed in the editor, including line breaks | +| language (optional) | Programming language used for syntax highlighting | +| showlinenumbers | Show or hide line numbers (default: true) *(Work in progress)* | -Since language and linenumbers are optional, existing ```code``` blocks can safley use this plugin +> Note: Since `language` and `showlinenumbers` are optional, existing `code` blocks can safely use this plugin. +--- +## Notes -