Question about JS File
kmartindale opened this issue · 2 comments
Hi OlivierCC,
I just had a quick question. I'm new to the SPFX and I'm trying to make sense of Custom Property Pane Fields. Can you clarify what the JS file you reference in your externals is used for? Just curious why it's needed?
Thank you so much!
Karissa
Hi @kmartindale,
Sure: in this lib 2 custom fields use external JS:
1: The SliderRange uses jQuery and jQuery UI and then will load 2 JS files and 1 CSS file from addresses like //cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js, //cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js and //cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css
2: The RichTextBox uses the popular CKEditor, which is a WYSIWYG editor in JS, loaded from CDN //cdn.ckeditor.com/4.6.2/basic/ckeditor.js
More info here:
https://jqueryui.com/slider/#range
http://ckeditor.com/
Regards,
Olivier
Thanks that super helpful! I was pretty sure these work pretty independently so that clears that up.