Advertisement
Guest User

Untitled

a guest
Oct 7th, 2021
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1.  
  2. CSS for line breaks
  3.  
  4.  
  5.  
  6. p:first-letter {font-weight: bold; color: white; border-style: dashed; border-color: black; font-size: 50px}
  7.  
  8.  
  9. CSS for italic/bold/underline
  10. This stuff gets pasted in Styling (shared between cards)
  11.  
  12. b {color: #000000; font-size:32px ;}
  13. .front i {color: #ffffff; font-size:1px ; }
  14. .ba i {color: #black; font-size:28px; font-style: normal; font-weight: bold;
  15.  
  16.  
  17. Javascript for find and replace text
  18.  
  19.  
  20. This gets pasted in the Front Template section:
  21. <script>
  22. fields = document.querySelectorAll('.front');
  23. for(var i=0; i<fields.length; i++) {
  24. fields[i].innerHTML = fields[i].innerHTML
  25. .replace(/\*-/g, ' <span style="font-size:49px">')
  26. .replace(/-\*/g, '</span>')
  27. }
  28. </script>
  29.  
  30.  
  31. Javascript for changing appearance of clozes
  32. This javascript changes the appearnce of cloze from the default {..} to |___|.
  33.  
  34. This gets pasted in the Front Template section:
  35.  
  36. <script>
  37. var cloze = document.querySelectorAll(".cloze");
  38. for(var i = 0; i < cloze.length; i++){
  39. cloze[i].textContent = "| __|";
  40. }
  41. </script>
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement