An isolated input using iframe but with the same events
npm install @creaditor/input-iframethis input is a lightweight, dependency free component for building text-editors without having to think about what happens to the text selection on blur.
Install the component via npm: npm i @creaditor/input-iframe.
- npm run build:watch
- npm run serve
- http://10.100.102.31:8000/dev
``js`
id="input-id"
inputStyle="color:red;font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;"
value="hello world"
placeholder="type something..."
>
`js`
input.addEventListener('blur', (e) => {
// some code
});
input.addEventListener('focus', (e) => {
// some code
});
input.addEventListener('submit', (e) => {
// some code
});
npm run build
npm publish`