All Projects → chuckh → Polymer Quill

chuckh / Polymer Quill

Polymer Quill Rich Text Editor

Projects that are alternatives of or similar to Polymer Quill

Egghead Typescript Vuejs Apps
Stars: ✭ 41 (-14.58%)
Mutual labels:  webcomponents
Enjoylife
😊开源App项目,每天一张精选倩图、一个精选小视频,一篇知乎美文
Stars: ✭ 43 (-10.42%)
Mutual labels:  demo
Rich Text Editor
Math editor (http://digabi.github.io/rich-text-editor/)
Stars: ✭ 45 (-6.25%)
Mutual labels:  demo
Osagai
🀄️A tiny library for creating WebComponents in a Functional way
Stars: ✭ 42 (-12.5%)
Mutual labels:  webcomponents
Beziercurve
Bezier curve master
Stars: ✭ 43 (-10.42%)
Mutual labels:  demo
Html Modules Toolkit
Transforming HTML standards of the future into JavaScript standards of the past
Stars: ✭ 45 (-6.25%)
Mutual labels:  webcomponents
Next On Netlify Demo
Demo of a Next.js app with Server-Side Rendering on Netlify
Stars: ✭ 40 (-16.67%)
Mutual labels:  demo
Mygoogleplaces
A simple demo of Google Places.
Stars: ✭ 46 (-4.17%)
Mutual labels:  demo
Masonry Layout
An efficient and fast web component that gives you a beautiful masonry layout
Stars: ✭ 43 (-10.42%)
Mutual labels:  webcomponents
Examples
Demo applications and code examples for Confluent Platform and Apache Kafka
Stars: ✭ 571 (+1089.58%)
Mutual labels:  demo
Realtime Detectron
Real-time Detectron using webcam.
Stars: ✭ 42 (-12.5%)
Mutual labels:  demo
Ezplatform Demo
Fork of "ezplatform" meta repository, contains code and dependencies for demo distribution of eZ Platform. Not recommended for a clean install for new projects, but great for observation and learning!
Stars: ✭ 42 (-12.5%)
Mutual labels:  demo
Wheelview
a great functional custom WheelView with demo in dialog and bottomDialog,android 滚动选择控件,滚动选择器,时间选择,日期选择
Stars: ✭ 44 (-8.33%)
Mutual labels:  demo
React Antd Todo
A simple todo list app built with React, Redux and Antd - Ant Design
Stars: ✭ 42 (-12.5%)
Mutual labels:  demo
Vantweappmpvuedemo
mpvue中使用Vant Weapp
Stars: ✭ 46 (-4.17%)
Mutual labels:  demo
Redaxo Mit Docker
Simple 🐳 Docker setup for REDAXO development. Contains demo website and beginner’s guide!
Stars: ✭ 40 (-16.67%)
Mutual labels:  demo
Flutter Chat Demo
The chat app made by Flutter and Firebase
Stars: ✭ 1,016 (+2016.67%)
Mutual labels:  demo
Vue Image Loader
Vue progressive image loader plugin like Medium
Stars: ✭ 47 (-2.08%)
Mutual labels:  medium
Create React Redux App
This project was bootstrapped with Create React App and Redux, Sass Structure.
Stars: ✭ 46 (-4.17%)
Mutual labels:  demo
Svelte Custom Elements
Turn Svelte components into web components
Stars: ✭ 45 (-6.25%)
Mutual labels:  webcomponents

Published on webcomponents.org Build Status

<polymer-quill>

Polymer Quill Rich Text Editor

  • <polymer-quill> element creates a Polymer Quill Rich Text Editor using the Snow Theme.
  • <polymer-quill-bubble> element creates a Polymer Quill Rich Text Editor using the Bubble Theme (popup toolbar like Medium).
  • <polymer-quill-html-render> element creates a Polymer Quill HTML Render

Quill is a free, open source WYSIWYG editor built for the modern web. With its modular architecture and expressive API, it is completely customizable to fit any need. Learn more at http://quilljs.com/

Screenshot Snow Theme

polymer-quill screenshot

<polymer-quill content="Hello World"></polymer-quill>
<polymer-quill-bubble content="Hello World (click text to see toolbar)" show-results></polymer-quill-bubble>    
<polymer-quill-html-render content='<h2 class="ql-align-center">Hello World</h2>'></polymer-quill-html-render>

Demo and API docs

If your are viewing this from webcomponents.org, use the below links for API and demos, not the links on right sidebar.

Examples

Defaults (stores as Deltas every 2 seconds, does not show results, 50px height)

<polymer-quill content="Hello World"></polymer-quill>

Defaults (stores as Deltas every 2 seconds, does not show results, 50px height)

<polymer-quill-bubble content="Hello World (click text to see toolbar)"></polymer-quill-bubble>    

Custom (stores as HTML every 5 seconds, show results)

<polymer-quill content="Hello World" store-as="html" store-interval="5000" show-results></polymer-quill>

Custom (stores as HTML every 5 seconds, show results)

<polymer-quill-html-render content="<h2 class="ql-align-center">Hello World</h2>"></polymer-quill-html-render>

Demo example

<style is="custom-style">
  polymer-quill.full {
    --polymer-quill-editor-max-height: 300px;
    --polymer-quill-editor-min-height: 100px;
  }
</style>
<h2>Full Toolbar, Show Results, Max Height (300px), Min Height (100px), Save as Deltas, Save every 1 second</h2>
<polymer-quill content='{"ops":[{"insert":"Hello World! - Store as Delta"},{"attributes":{"header":2},"insert":"\n"}]}'
  class='full'
  store-as="delta"
  save-interval="1000"
  toolbar-type="full"
  show-results>
</polymer-quill>
<h2>Standard Toolbar, Hide Results, Default height (100px), Save as HTML, Save every 2 seconds</h2>
<polymer-quill content="<h2>Hello World! - Store as HTML</h2>" store-as="html"></polymer-quill>

Styling

The following custom properties and mixins are available for styling. This allows the editor auto grow to the max-height.:

polymer-quill (Snow theme)

Also had to make editor have padding-bottom: 50px to have link popup show.

Custom property Description Default
--polymer-quill-editor-max-height Custom max-height for editor 400px
--polymer-quill-editor-min-height Custom max-height for editor 50px
--polymer-quill-editor-overflow Custom overflow for editor scroll
--polymer-quill-editor-border Custom min-height for editor solid 1px #ccc
--polymer-quill Mixin applied to the editor {}

Below is example of setting the editor to max-height of 260px less then the viewport height and min-height of 150px. So any content greater then the max-height with scroll otherwise it will auto grow.

polymer-quill {
  --polymer-quill-editor-max-height: calc(100vh - 260px);
  --polymer-quill-editor-min-height: 150px;
  max-width: 870px;
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
  padding: 0;
  margin-left: auto;
  margin-bottom: 5px;
  margin-right: auto;
  border-radius: 5px;
  background-color: #fff;
  color: #212121;
}

polymer-quill-bubble (Bubble theme)

Max-height needs to be set for bubble popup toolbar to work with is default. Also had to make editor have padding-bottom: 50px so toolbar displays for last line.

Custom property Description Default
--polymer-quill-editor-max-height Custom max-height for editor auto
--polymer-quill-editor-min-height Custom min-height for editor 50px
--polymer-quill-editor-overflow Custom overflow for editor scroll
--polymer-quill-editor-border Custom min-height for editor solid 1px #ccc
--polymer-quill Mixin applied to the editor {}

Install

bower install --save polymer-quill

Polymer Starter Kit 2

If you are using Polymer Starter Kit 2 or like as the bases of your app you will need to change dom: 'shadow' to dom: 'shady' like below. Otherwise the Polymer Quill Editor will not display.

  // Setup Polymer options
  window.Polymer = {
    dom: 'shady',
    lazyRegister: true
  };

License

The MIT License (MIT)

Copyright (c) 2016 Chuck Horton

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

open source initiative

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].