All Projects → benhowell → reagent-quill

benhowell / reagent-quill

Licence: other
Basic reagent recipe for quill rich text editor

Programming Languages

clojure
4091 projects

Projects that are alternatives of or similar to reagent-quill

React Quill
A Quill component for React.
Stars: ✭ 4,739 (+29518.75%)
Mutual labels:  quill
Quill Delta Parser
A PHP library to parse and render Quill WYSIWYG Deltas into HTML - Flexibel and extendible for custom elements.
Stars: ✭ 63 (+293.75%)
Mutual labels:  quill
Quill Cursors
A multi cursor module for Quill text editor.
Stars: ✭ 139 (+768.75%)
Mutual labels:  quill
Vue Quill Editor
🍡@quilljs editor component for @vuejs
Stars: ✭ 6,874 (+42862.5%)
Mutual labels:  quill
Yii2 Quill
Yii 2 implementation of Quill, modern WYSIWYG editor
Stars: ✭ 52 (+225%)
Mutual labels:  quill
Ultron.g8
A ZIO + http4s + Circe + Quill + Tapir giter8 template
Stars: ✭ 107 (+568.75%)
Mutual labels:  quill
quill-placeholder-module
A quill module for adding placeholders
Stars: ✭ 27 (+68.75%)
Mutual labels:  quill
Vue2 Editor
A text editor using Vue.js and Quill
Stars: ✭ 2,316 (+14375%)
Mutual labels:  quill
Node Quill Converter
Convert HTML to a Quill Delta or a Quill Delta to HTML
Stars: ✭ 61 (+281.25%)
Mutual labels:  quill
Ngx Quill Example
demo app for the advanced usage of ngx-quill module
Stars: ✭ 137 (+756.25%)
Mutual labels:  quill
Rating Stars
⭐️⭐️⭐️⭐️⭐️ A 5-star rating widget implemented in JS and CSS
Stars: ✭ 18 (+12.5%)
Mutual labels:  quill
Scala Db Codegen
Scala code/boilerplate generator from a db schema
Stars: ✭ 49 (+206.25%)
Mutual labels:  quill
Ruoyi Vue Fast
(RuoYi)官方仓库 基于SpringBoot,Spring Security,JWT,Vue & Element 的前后端分离权限管理系统
Stars: ✭ 107 (+568.75%)
Mutual labels:  quill
Ruoyi Vue
(RuoYi)官方仓库 基于SpringBoot,Spring Security,JWT,Vue & Element 的前后端分离权限管理系统
Stars: ✭ 596 (+3625%)
Mutual labels:  quill
Quill Better Table
Module for better table in Quill, more useful features are supported.
Stars: ✭ 175 (+993.75%)
Mutual labels:  quill
Quill Mention
💬 @mentions for the Quill rich text editor
Stars: ✭ 349 (+2081.25%)
Mutual labels:  quill
Ngx Quill
Angular (>=2) components for the Quill Rich Text Editor
Stars: ✭ 1,382 (+8537.5%)
Mutual labels:  quill
Ngx Quill Editor
🍡@quilljs editor component for @angular
Stars: ✭ 234 (+1362.5%)
Mutual labels:  quill
Flutter Quill
Rich text editor for Flutter
Stars: ✭ 177 (+1006.25%)
Mutual labels:  quill
Quill Sharedb Cursors
Collaborative editing with multi cursors sync using Quill and ShareDB.
Stars: ✭ 121 (+656.25%)
Mutual labels:  quill

reagent-quill

Basic reagent recipe for Quill rich text editor

See the Quill documentation for a full rundown of what's possible. Note that the toolbar can have many more functions including your own custom stuff. Also note that this example deals with only HTML and therefore does not use deltas and as such does no delta <-> HTML conversion. I have built these particular examples to both create text and display text (so for just displaying text, building an editor without a toolbar is as straight forward as it sounds). These recipes provide clear enough templates to riff on.

Usage

Add the css theme file (adjusting paths to suit) to the head of your file

[:head
 ;; other head stuff ...
 (include-css "/quill/css/quill.snow.css")]

Add the cljsjs dependency

[cljsjs/quill "1.1.0-3"]

reagent-quill/editor takes the following parameters:

  • id (string): a unique id to associate with the editor and toolbar of your quill component
  • content (string | html): the content to display
  • selection (vector [start-index finish-index] | nil): the text to select
  • on-change-fn (function): the function to call when editor text changes

Make sure to require cljsjs.quill somewhere in your project so it is added to your compiled ClojureScript code. I put all my cljsjs deps in core.cljs but it really doesn't matter. Note: you need only reference the cljsjs.quill dep once and it'll be available everywhere in your project.

In your reagent app, use the editor like so:

(ns your.component.or.view
  (:require
   [quill :as quill]))
   
   [:div
    [quill/editor
    {:id "my-quill-editor-component-id"
     :content "welcome to reagent-quill!"
     :selection nil
     :on-change-fn #(if (= % "user")
                      (println (str "text changed: " %2))}]]

reagent-quill/display-area takes the following parameters:

  • id (string): a unique id to associate with the editor and toolbar of your quill component
  • content (string | html): the content to display

In your reagent app, use the display-area like so:

(ns your.component.or.view
  (:require
   [quill :as quill]))
   
   [:div
    [quill/display-area
    {:id "my-quill-display-area-component-id"
     :content "welcome to reagent-quill!"}]]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].