@creaditor/input-iframe
v1.0.11
Published
An isolated input using iframe but with the same events
Downloads
28
Maintainers
Readme
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