ko-quill

WebJar for ko-quill

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.bower
Идентификатор

Идентификатор

ko-quill
Последняя версия

Последняя версия

0.1.3
Дата

Дата

Тип

Тип

jar
Описание

Описание

ko-quill
WebJar for ko-quill
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/nadirizr/quill-editor-knockout-binding

Скачать ko-quill

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.bower/ko-quill/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>ko-quill</artifactId>
    <version>0.1.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/ko-quill/
implementation 'org.webjars.bower:ko-quill:0.1.3'
// https://jarcasting.com/artifacts/org.webjars.bower/ko-quill/
implementation ("org.webjars.bower:ko-quill:0.1.3")
'org.webjars.bower:ko-quill:jar:0.1.3'
<dependency org="org.webjars.bower" name="ko-quill" rev="0.1.3">
  <artifact name="ko-quill" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='ko-quill', version='0.1.3')
)
libraryDependencies += "org.webjars.bower" % "ko-quill" % "0.1.3"
[org.webjars.bower/ko-quill "0.1.3"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

quill-editor-knockout-binding

A knockout binding for the Quill Editor (https://github.com/quilljs/quill)

This is a plugin that allows you to bind a Quill Editor element with a Knockout observable for both text and HTML.

Installation

bower install ko-quill

Usage

This plugin allows to use the binding 'quill' to do one of the following:

  • Bind to a single observable for the HTML content:
<div data-bind="quill: htmlObservable">
</div>

<script>
  var model = { htmlObservable: ko.observable("<strong>Quill!</strong>") };
  ko.applyBindings(model);
</script>
  • Bind to an object with several observables and settings:
<div id="toolbar">
  <button class="ql-bold">Bold</button>
  <button class="ql-italic">Italic</button>
</div>
<div data-bind="quill: { html: htmlObservable,
                         text: textObservable,
                         toolbar: '#toolbar',
                         enable: enableObservable }">
</div>

<script>
  var model = { htmlObservable: ko.observable("<strong>Quill!</strong>"),
                textObservable: ko.observable(),  // htmlObservable supercedes textObservable.
                enableObservable: ko.observable(true) };
  ko.applyBindings(model);
</script>

Quill Editor Parameters

There are several configurable parameters and observables when using the 'quill' binding:

  • html: Either a string or an observable that will update the Quill Editor using the setHTML method.
  • text: Either a string or an observable that will update the Quill Editor using the setText method.
  • toolbar: A selector for the toolbar element to use when initializing as documented here.
  • enable: A boolean or an observable that will control whether the Quill Editor is enabled.

Notes

  • If you use both 'html' and 'text' observables, both are updated when changes are made in the editor, but only 'html' data changes will be reflected in the editor.
  • If you use only a 'text' observable, changes to it will of course be reflected as usual in the editor.

Версии библиотеки

Версия
0.1.3