Guest User

Untitled

a guest
Jan 21st, 2018
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.75 KB | None | 0 0
  1. BBCodeBar = {
  2. markupSet: [
  3. {name:'Gras : [b]gras[/b]', key:'B', openWith:'[b]', closeWith:'[/b]', className:'markItUpBold'}, {name:'Italique : [i]italique[/i]', key:'I', openWith:'[i]', closeWith:'[/i]', className:'markItUpItalic'}, {name:'Souligné : [u]souligné[/u]', key:'U', openWith:'[u]', closeWith:'[/u]', className:'markItUpUnderline'}, {name:'Barré : [s]barré[/s]', key:'S', openWith:'[s]', closeWith:'[/s]', className:'markItUpStroke'},
  4. {separator:'|'},
  5. {name:'Paragraphe : [p]Paragraphe[/p]', openWith:'[p]', closeWith:'[/p]', className:'markItUpParagraph'}, {name:'Centré : [center]centré[/center]', openWith:'[center]', closeWith:'[/center]', className:'markItUpCenter'}, {name:'Droite : [right]droite[/right]', openWith:'[right]', closeWith:'[/right]', className:'markItUpRight'}, {name:'Citation : [quote]Citation[/quote]', openWith:'[quote]', closeWith:'[/quote]', className:'markItUpQuote'},
  6. {separator:'|'},
  7. {name:'Liste : [ul][li]élément[/li][/ul]', openWith:'[ul]\n', closeWith:'\n[/ul]', className:'markItUpListUL'}, {name:'Liste Numéroté : [ol][li]élément[/li][/ol]', openWith:'[ol]\n', closeWith:'\n[/ol]', className:'markItUpListOL'}, {name:'Element de liste : [li]élément[/li]', openWith:'[li]', closeWith:'[/li]', className:'markItUpListLI'},
  8. {separator:'|' },
  9. {name:'Image : [img]Image[/img]', key:'P', replaceWith:'[img][![Url]!][/img]', className:'markItUpPicture'}, {name:'URL : [url=Page URL]Nom de la page[/url]', key:'L', openWith:'[url=[![Url]!]]', closeWith:'[/url]', className:'markItUpLink'}, {name:'E-mail : [email]Email[/email]', key:'M', replaceWith:'[email][![Mail]!][/email]', className:'markItUpMail'},
  10. {separator:'|'},
  11. {name:'Taille des caractères : [size=X]texte[/size]', className:'markItUpSize',
  12. dropMenu :[
  13. {name:'Tout petit', openWith:'[size=7]', closeWith:'[/size]' },
  14. {name:'Petit', openWith:'[size=9]', closeWith:'[/size]' },
  15. {name:'Normale', openWith:'[size=12]', closeWith:'[/size]' },
  16. {name:'Grand', openWith:'[size=18]', closeWith:'[/size]' },
  17. {name:'Très grand', openWith:'[size=24]', closeWith:'[/size]' },
  18. ]
  19. },
  20. {name:'Couleur : [color=couleur]texte[/color]', className:'markItUpColors', openWith:'[color=[![Color]!]]', closeWith:'[/color]',
  21. dropMenu: [
  22. {name:'Jaune', openWith:'[color=yellow]', closeWith:'[/color]', className:"col1-1" },
  23. {name:'Orange', openWith:'[color=orange]', closeWith:'[/color]', className:"col1-2" },
  24. {name:'Rouge', openWith:'[color=red]', closeWith:'[/color]', className:"col1-3" },
  25.  
  26. {name:'Bleu', openWith:'[color=blue]', closeWith:'[/color]', className:"col2-1" },
  27. {name:'Violet', openWith:'[color=purple]', closeWith:'[/color]', className:"col2-2" },
  28. {name:'Vert', openWith:'[color=green]', closeWith:'[/color]', className:"col2-3" },
  29.  
  30. {name:'Blanc', openWith:'[color=white]', closeWith:'[/color]', className:"col3-1" },
  31. {name:'Gris', openWith:'[color=gray]', closeWith:'[/color]', className:"col3-2" },
  32. {name:'Noir', openWith:'[color=black]', closeWith:'[/color]', className:"col3-3" }
  33. ]
  34. },
  35. ]
  36. };
  37.  
  38. jQuery(document).ready(function() {
  39. jQuery('#addComment textarea').markItUp(BBCodeBar);
  40. });
  41. $(document).ready(function() {
  42. if (jQuery('.markItUp').length == 0) {
  43. jQuery('#addComment textarea').markItUp({markupSet: []});
  44. }
  45. jQuery('#SmiliesSupport').appendTo('.markItUpHeader ul:first-child');
  46. jQuery('#allsmilies').mouseover(function(){
  47. jQuery("#addComment textarea").focus();
  48. jQuery('#smiliesdiv').css('display','');
  49. });
  50. jQuery('#smiliesdiv a').click(function() {
  51. emoticon = jQuery(this).attr("title");
  52. jQuery.markItUp({ replaceWith:emoticon });
  53. jQuery('#smiliesdiv').css('display','none');
  54. return false;
  55. });
  56. });
Add Comment
Please, Sign In to add comment