emoticons.html 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
  6. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css">
  7. <link rel="stylesheet" href="../../css/froala_editor.css">
  8. <link rel="stylesheet" href="../../css/froala_style.css">
  9. <link rel="stylesheet" href="../../css/plugins/emoticons.css">
  10. <style>
  11. body {
  12. text-align: center;
  13. }
  14. section {
  15. width: 81%;
  16. margin: auto;
  17. text-align: left;
  18. }
  19. </style>
  20. </head>
  21. <body>
  22. <section id="editor">
  23. <div id='edit' style="margin-top: 30px;">
  24. <h1>Custom Emoticons</h1>
  25. <p>Using the <code>emoticons.min.js</code> plugin you can insert emoticons in the WYSIWYG HTML editor.</p>
  26. <p>There are 2 options that can be used to customize the insert emoticon popup:</p>
  27. <ul>
  28. <li><a href="https://www.froala.com/wysiwyg-editor/v2.0/docs/options#emoticonsStep" title="emoticonsStep option"
  29. target="_blank">emoticonsStep</a> - The number of emoticons displayed on a line in the insert emoticon
  30. popup.</li>
  31. <li><a href="https://www.froala.com/wysiwyg-editor/v2.0/docs/options#emoticonsSet" title="emoticonsSet option"
  32. target="_blank">emoticonsSet</a> - An array of emoticons available in the insert emoticon popup.</li>
  33. </ul>
  34. </div>
  35. </section>
  36. <script type="text/javascript"
  37. src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.3.0/codemirror.min.js"></script>
  38. <script type="text/javascript"
  39. src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.3.0/mode/xml/xml.min.js"></script>
  40. <script type="text/javascript" src="../../js/froala_editor.min.js"></script>
  41. <script type="text/javascript" src="../../js/plugins/link.min.js"></script>
  42. <script type="text/javascript" src="../../js/plugins/emoticons.min.js"></script>
  43. <script>
  44. new FroalaEditor("#edit", {
  45. toolbarButtons: [ ['bold', 'italic', 'underline', 'strikeThrough', 'emoticons'], ['undo', 'redo'] ],
  46. emoticonsStep: 4,
  47. emoticonsSet: [
  48. {
  49. 'id': 'people',
  50. 'name': 'Smileys & People',
  51. 'code': '1f600',
  52. 'emoticons': [
  53. { code: '1f600', desc: 'Grinning face' },
  54. { code: '1f601', desc: 'Grinning face with smiling eyes' },
  55. { code: '1f602', desc: 'Face with tears of joy' },
  56. { code: '1f603', desc: 'Smiling face with open mouth' },
  57. { code: '1f604', desc: 'Smiling face with open mouth and smiling eyes' },
  58. { code: '1f605', desc: 'Smiling face with open mouth and cold sweat' },
  59. { code: '1f606', desc: 'Smiling face with open mouth and tightly-closed eyes' },
  60. { code: '1f607', desc: 'Smiling face with halo' }
  61. ]
  62. }]
  63. })
  64. </script>
  65. </body>
  66. </html>