Search code examples
ractivejs

RactiveJS on-enter plugin missing


I've been looking for the "on-enter" plugin which seems to be working in the Tutorials section found here. Wierd fact, in the plugins section the keys events plugin went missing ( or link didn't get updated, whatever ).

Problem is, there's nothing regarding that in the tutorial but it works there. So if anyone has a link or something, it'd be great !

I'm tired of on-keydown's :(


Solution

  • It's part of: https://github.com/ractivejs/ractive-events-keys.

    via npm (> npm i ractive-events-keys --save):

    var keys = require( 'ractive-events-keys' );
    Ractive.events.enter = keys.enter;
    

    Or just as browser script (available in the dist folder of the project):

    <script src='ractive.js'></script>
    <script src='ractive-events-keys.js'></script>