app.js 713 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. "use strict";
  2. jQuery( document ).ready(function( $ ) {
  3. // Scroll
  4. $('a').smoothScroll({
  5. speed: 400,
  6. offset: -20
  7. });
  8. var sticky = new Sticky('.stickyscroll');
  9. // Alerts
  10. var alerts = new Alerts();
  11. if(alertsData) {
  12. _.forEach(alertsData, (alertRow) => {
  13. alerts.push(alertRow);
  14. });
  15. }
  16. // Editor
  17. if($('#mk-editor').length === 1) {
  18. let mde = new SimpleMDE({
  19. autofocus: true,
  20. element: $("#mk-editor").get(0),
  21. autoDownloadFontAwesome: false,
  22. placeholder: 'Enter Markdown formatted content here...',
  23. hideIcons: ['heading', 'quote'],
  24. showIcons: ['strikethrough', 'heading-1', 'heading-2', 'heading-3', 'code', 'table', 'horizontal-rule'],
  25. spellChecker: false
  26. });
  27. }
  28. });