function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nicola GrisctiNicola Griscti 

lightning web components - use standard JS features..

Hi

I am using the lightning-record-edit-form component, I tried using Lightning-record-form only but this component doesn't seeem to understand the complexity of the Content of a ContentNote.. I want to also use the lightning-input-rich-text component to create some Content for my Content Note and save it. Because it needs to be Base64 encoded, I would just like to use a standard method like Bae64.encode etc. from the js-base64 library, so I can encode the content of the note before saving in the DB using the recordform submit..

From reading docs I think this means I will need to, import this JS library as a static resource - create some kind of lighting web component service and expose this to my components so any of them can use this library? Is there any standard CLI commands to install pacakges with npm or ..anything like this?

Or is there some better way to do this?

Thanks
Best Answer chosen by Nicola Griscti
Nicola GrisctiNicola Griscti
Got it working seemingly. Check out my repo here if it may help anyone: https://github.com/punxcat/notecontent-lwc