@creaditor/input-iframe
TypeScript icon, indicating that this package has built-in type declarations

1.0.11 • Public • Published

Iframe Input - to keep text selection on blur.

Overview

this input is a lightweight, dependency free component for building text-editors without having to think about what happens to the text selection on blur.

Usage

Install the component via npm: npm i @creaditor/input-iframe.

Start

  • npm run build:watch
  • npm run serve
  • http://10.100.102.31:8000/dev

How to use.

<cdtr-input-iframe
  width="100px"
  id="input-id"
  inputStyle="color:red;font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;"
  value="hello world"
  placeholder="type something..."
></cdtr-input-iframe>

Add Listeners

input.addEventListener('blur', (e) => {
  // some code
});
input.addEventListener('focus', (e) => {
  // some code
});
input.addEventListener('submit', (e) => {
  // some code
});

Build

npm run build

Publish

npm publish

Package Sidebar

Install

npm i @creaditor/input-iframe

Weekly Downloads

134

Version

1.0.11

License

BSD-3-Clause

Unpacked Size

80.5 kB

Total Files

44

Last publish

Collaborators

  • creaditor