undate

WebJar for undate

Лицензия

Лицензия

MIT
Группа

Группа

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

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

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

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

0.2.4
Дата

Дата

Тип

Тип

jar
Описание

Описание

undate
WebJar for undate
Ссылка на сайт

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

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

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

https://github.com/yuku/undate

Скачать undate

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

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

Зависимости

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

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

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

undate

Undoable update for HTMLTextAreaElement

NPM version Build Status Code Climate

Install

npm install --save undate

Usage

import {update, wrapCursor} from 'undate';

const textareaElement = document.getElementById('textarea');

textareaElement.value; //=> ''

// Update whole value
update(textareaElement, 'string before cursor', 'optional string after cursor');

textareaElement.value; //=> 'string before cursoroptional string after cursor'

// Update around the cursor
wrapCursor(textareaElement, ' _', '_ ');

textareaElement.value; //=> 'string before cursor __ optional string after cursor'

// Press cmd-z

textareaElement.value; //=> 'string before cursoroptional string after cursor'

textareaElement.setSelectionRange(14, 27);

textareaElement.value; //=> 'string before cursoroptional string after cursor'
                       //                  ^^^^^^^^^^^^^^ selected

wrapCursor(textareaElement, '**', '**');

textareaElement.value; //=> 'string before **cursoroptional** string after cursor'
                       //                    ^^^^^^^^^^^^^^ selected

// Press cmd-z

textareaElement.value; //=> 'string before cursoroptional string after cursor'
                       //                  ^^^^^^^^^^^^^^ selected

// Press cmd-z

textareaElement.value; //=> ''

License

The MIT License

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

Версия
0.2.4