Subtle Crypto Algorithm Choice
RSA can not directly encrypt large data.
You need to generate a random key for a symmetric cipher (secure random), encrypt the large data with this key using a secure mode (e.g GCM).
encrypt the key with your RSA public key,
prepend encrypted key to encrypted data.
store.
This is just for understanding of what goes on, you should look for a library which does as much of this together as possible from a reputable source, start with libsodium which I believe has a pure JS implementation.