Zum Ende der Metadaten springen
Zum Anfang der Metadaten

Sie zeigen eine alte Version dieser Seite an. Zeigen Sie die aktuelle Version an.

Unterschiede anzeigen Seitenhistorie anzeigen

Version 1 Nächste Version anzeigen »

There are two ways to create an instance of CWI:

  • Use a script within the HTML document containing the code to instantiate CWI
  • Include a reference to Javascript file containing the code to instantiate CWI

If you decide to choose the last option the code shown below goes into a JavaScript file.

Let's have a look at the code and discuss the different parameters.

<script>
        var host = [hostname];
        var user = [username];
        var pw = [password];
        var congree = window.Congree || {};
        window.Congree = congree;

        congree.loadSidebar = function (user, pw) {
           
            congree.sidebar = new Congree.Sidebar({
                serverAddress: "[hostname]/Congree",
                authentication: {
                    userName: user,
                    password: pw,
                    accessTokenURL: "[hostname]/congreeidentityserver/connect/token",
                    loginType: "cms"
                },
               
                initialRuleSetName: "[ruleset]",
                requestValidTerms: false,
                culture: "[culture]",
                editors: [
                    Congree.AdapterFor.TextInput('textarea', 'textarea'),
                    Congree.AdapterFor.TextInput('input', 'input'),

                    Congree.AdapterFor.CKEditor4({ '.ckeeditor')
                ]
            });
            congree.sidebar.show('congree');
        };
       
	};


  • Keine Stichwörter