tinymce-example-full

by powenko

HTML

<!DOCTYPE html>
<html lang="en">
<head> 
    <script src="https://cdn.tiny.cloud/1/mott8ilewgbu1tryzfu9q7sdcmn5qfqt19jixbvaqgaz6kjc/tinymce/5/tinymce.min.js" referrerpolicy="origin"></script>
 
    <script src="https://code.jquery.com/jquery-1.11.3.js"></script>
    
    <script src="https://cdn.jsdelivr.net/npm/faker@5/dist/faker.min.js"></script>
      <script>

    </script>
</head>
<body>
<textarea id="richTextArea_www_powenko_com"></textarea>
www.popwenko.com
</body>
</html>

JavaScript

/*
            ** This is to simulate requesting information from a server.
            **
            ** It has 2 functions:
            ** fetchUsers() - returns a complete list of users' ids and names.
            ** fetchUser(id) - returns the full information about a single user id.
            **
            ** Both of these functions have a slight delay to simulate a server request.
            */
            var fakeServer = (function () {
                /* Use TinyMCE's Promise shim */
                var Promise = tinymce.util.Promise;

                /* Some user profile images for our fake server (original source: unsplash) */
                var images = [
                    'Abdullah_Hadley', 'Abriella_Bond', 'Addilynn_Dodge', 'Adolfo_Hess', 'Alejandra_Stallings', 'Alfredo_Schafer', 'Aliah_Pitts', 'Amilia_Luna', 'Andi_Lane', 'Angelina_Winn', 'Arden_Dean', 'Ariyanna_Hicks', 'Asiya_Wolff', 'Brantlee_Adair', 'Carys_Metz', 'Daniela_Dewitt', 'Della_Case', 'Dianna_Smiley', 'Eliana_Stout', 'Elliana_Palacios', 'Fischer_Garland', 'Glen_Rouse', 'Grace_Gross', 'Heath_Atwood', 'Jakoby_Roman', 'Judy_Sewell', 'Kaine_Hudson', 'Kathryn_Mcgee', 'Kayley_Dwyer', 'Korbyn_Colon', 'Lana_Steiner', 'Loren_Spears', 'Lourdes_Browning', 'Makinley_Oneill', 'Mariana_Dickey', 'Miyah_Myles', 'Moira_Baxter', 'Muhammed_Sizemore', 'Natali_Craig', 'Nevaeh_Cates', 'Oscar_Khan', 'Rodrigo_Hawkins', 'Ryu_Duke', 'Tripp_Mckay', 'Vivianna_Kiser', 'Yamilet_Booker', 'Yarely_Barr', 'Zachary_Albright', 'Zahir_Mays', 'Zechariah_Burrell'
                ];

                /* Create an array of 200 random names using faker.js */
                var userNames = [];
                for (var i = 0; i < 200; i++) {
                    userNames.push(faker.name.findName());
                }
                ;

                /* This represents a database of users on the server */
                var userDb = {};
                userNames.map(function (fullName) {
                    var id =...