Grammalecte  Diff

Differences From Artifact [e3f8378c10]:

To Artifact [4865d913a8]:


39
40
41
42
43
44
45
46

47
48
49
50
51
52
53
39
40
41
42
43
44
45

46
47
48
49
50
51
52
53







-
+







        xWrapper.style = "padding: 5px; color: hsl(210, 10%, 90%); background-color: hsl(210, 50%, 50%); border-radius: 3px;";
        xWrapper.id = nWrapper + 1;
        nWrapper += 1;
        xParentElement.insertBefore(xWrapper, xTextArea);
        xWrapper.appendChild(xTextArea); // move textarea in wrapper
        let xToolbar = createWrapperToolbar(xTextArea);
        xWrapper.appendChild(xToolbar);
        loadImage("GrammalecteTitle", "img/logo-16.png");
        //loadImage("GrammalecteTitle", "img/logo-16.png");
    }
    catch (e) {
        showError(e);
    }
}

let sButtonStyle = "display: inline-block; padding: 0 5px; margin-left: 5px; background-color: hsl(210, 50%, 60%); border-radius: 2px; cursor: pointer;";
114
115
116
117
118
119
120
121
122

123
124
125
126
127
128
129
114
115
116
117
118
119
120

121
122
123
124
125
126
127
128
129







-

+







function createTFPanel (xTextArea) {
    console.log("Formateur de texte");
    if (xTFPanel !== null) {
        xTFPanel.style.display = "block";
    } else {
        // create the panel
        xTFPanel = createPanelFrame("tf_panel", "Formateur de texte", 800, 500);
        xTFPanel.appendChild(createTextFormatter(xTextArea));
        document.body.appendChild(xTFPanel);
        document.getElementById("tf_panel_content").appendChild(createTextFormatter(xTextArea));
    }
}

function createLxgPanel (xTextArea) {
    console.log("Lexicographe");
    if (xLxgPanel !== null) {
        xLxgPanel.style.display = "block";
137
138
139
140
141
142
143
144
145

146
147
148
149
150
151
152
137
138
139
140
141
142
143

144
145
146
147
148
149
150
151
152







-

+







function createGCPanel (oErrors) {
    console.log("Correction grammaticale");
    if (xGCPanel !== null) {
        xGCPanel.style.display = "block";
    } else {
        // create the panel
        xGCPanel = createPanelFrame("gc_panel", "Correcteur", 400, 800);
        xGCPanel.appendChild(document.createTextNode(JSON.stringify(oErrors)));
        document.body.appendChild(xGCPanel);
        document.getElementById("gc_panel_content").appendChild(document.createTextNode(JSON.stringify(oErrors)));
    }
}


/*
    Simple message
*/