UNPKG

froala-editor

Version:

A beautiful jQuery WYSIWYG HTML rich text editor. High performance and modern design make it easy to use for developers and loved by users.

81 lines (71 loc) 3.99 kB
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css"> <link rel="stylesheet" href="../css/froala_editor.css"> <link rel="stylesheet" href="../css/froala_style.css"> <link rel="stylesheet" href="../css/plugins/code_view.css"> <link rel="stylesheet" href="../css/plugins/image.css"> <link rel="stylesheet" href="../css/plugins/emoticons.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.3.0/codemirror.min.css"> <style> body { text-align: center; } section { width: 81%; margin: auto; text-align: left; } </style> </head> <body> <section id="editor"> <div id='edit' style="margin-top: 30px;"> <h1>Custom Emoticons</h1> <img class="fr-fir" src="../img/photo1.jpg" alt="Old Clock" width="200"/> <p>Using the <code>emoticons.min.js</code> plugin you can insert emoticons in the WYSIWYG HTML editor.</p> <p>There are 2 options that can be used to customize the insert emoticon popup:</p> <ul> <li><a href="https://www.froala.com/wysiwyg-editor/v2.0/docs/options#emoticonsStep" title="emoticonsStep option" target="_blank">emoticonsStep</a> - The number of emoticons displayed on a line in the insert emoticon popup.</li> <li><a href="https://www.froala.com/wysiwyg-editor/v2.0/docs/options#emoticonsSet" title="emoticonsSet option" target="_blank">emoticonsSet</a> - An array of emoticons available in the insert emoticon popup.</li> </ul> </div> </section> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.3.0/codemirror.min.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.3.0/mode/xml/xml.min.js"></script> <script type="text/javascript" src="../js/froala_editor.min.js"></script> <script type="text/javascript" src="../js/plugins/code_beautifier.min.js"></script> <script type="text/javascript" src="../js/plugins/code_view.min.js"></script> <script type="text/javascript" src="../js/plugins/draggable.min.js"></script> <script type="text/javascript" src="../js/plugins/font_size.min.js"></script> <script type="text/javascript" src="../js/plugins/font_family.min.js"></script> <script type="text/javascript" src="../js/plugins/paragraph_style.min.js"></script> <script type="text/javascript" src="../js/plugins/lists.min.js"></script> <script type="text/javascript" src="../js/plugins/image.min.js"></script> <script type="text/javascript" src="../js/plugins/link.min.js"></script> <script type="text/javascript" src="../js/plugins/video.min.js"></script> <script type="text/javascript" src="../js/plugins/emoticons.min.js"></script> <script> $(function(){ $('#edit').froalaEditor({ toolbarButtons: ['bold', 'italic', 'underline', 'strikeThrough', 'emoticons', '|', 'paragraphFormat', 'align', 'undo', 'redo', 'html'], emoticonsStep: 4, emoticonsSet: [ { code: '&#x1f600;', desc: 'Grinning face' }, { code: '&#x1f601;', desc: 'Grinning face with smiling eyes' }, { code: '&#x1f602;', desc: 'Face with tears of joy' }, { code: '&#x1f603;', desc: 'Smiling face with open mouth' }, { code: '&#x1f604;', desc: 'Smiling face with open mouth and smiling eyes' }, { code: '&#x1f605;', desc: 'Smiling face with open mouth and cold sweat' }, { code: '&#x1f606;', desc: 'Smiling face with open mouth and tightly-closed eyes' }, { code: '&#x1f607;', desc: 'Smiling face with halo' } ] }) }); </script> </body> </html>