Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 23... Línea 23...
23
 
23
 
24
import {
24
import {
25
    addToolbarButton,
25
    addToolbarButton,
26
    addMenubarItem,
26
    addMenubarItem,
27
    addToolbarSection,
27
    addToolbarSection,
-
 
28
    addContextmenuItem,
28
    addContextmenuItem
29
    removeMenubarItem,
29
} from 'editor_tiny/utils';
30
} from 'editor_tiny/utils';
30
import {
31
import {
31
    getInitialPluginConfiguration,
32
    getInitialPluginConfiguration,
32
    getPluginOptionName
33
    getPluginOptionName
Línea 121... Línea 122...
121
    // Table of Contents.
122
    // Table of Contents.
122
    if (enabledPremiumPlugins.indexOf('tableofcontents') !== -1) {
123
    if (enabledPremiumPlugins.indexOf('tableofcontents') !== -1) {
123
        plugins += ` tableofcontents`;
124
        plugins += ` tableofcontents`;
124
        toolbar = addToolbarButton(toolbar, 'premium_a', 'tableofcontents');
125
        toolbar = addToolbarButton(toolbar, 'premium_a', 'tableofcontents');
125
    }
126
    }
-
 
127
    // MathML
-
 
128
    if (enabledPremiumPlugins.indexOf('math') !== -1) {
-
 
129
        plugins += ` math`;
-
 
130
        toolbar = addToolbarButton(toolbar, 'premium_a', 'math');
-
 
131
        menu = addMenubarItem(menu, 'insert', 'math', 'tableofcontents');
-
 
132
    }
126
    // Footnotes.
133
    // Footnotes.
127
    if (enabledPremiumPlugins.indexOf('footnotes') !== -1) {
134
    if (enabledPremiumPlugins.indexOf('footnotes') !== -1) {
128
        plugins += ` footnotes`;
135
        plugins += ` footnotes`;
129
        toolbar = addToolbarButton(toolbar, 'premium_a', 'footnotes');
136
        toolbar = addToolbarButton(toolbar, 'premium_a', 'footnotes');
130
        menu = addMenubarItem(menu, 'insert', 'footnotes', 'tableofcontents');
137
        menu = addMenubarItem(menu, 'insert', 'footnotes', 'tableofcontents');
131
    }
138
    }
132
    // Powerpaste.
139
    // Powerpaste.
133
    if (enabledPremiumPlugins.indexOf('powerpaste') !== -1) {
140
    if (enabledPremiumPlugins.indexOf('powerpaste') !== -1) {
134
        plugins += ` powerpaste`;
141
        plugins += ` powerpaste`;
135
    }
142
    }
-
 
143
    // Accessibility Checker.
-
 
144
    if (enabledPremiumPlugins.indexOf('a11ychecker') !== -1) {
-
 
145
        plugins += ` a11ychecker`;
-
 
146
        toolbar = addToolbarButton(toolbar, 'premium_a', 'a11ycheck');
-
 
147
        // Tiny's allychecker plugin is listed in the menu by default. Let's remove it and add it where we want it.
-
 
148
        menu = removeMenubarItem(menu, 'tools', 'a11ycheck');
-
 
149
        // Positioning the a11ychecker in the same position as tiny_accessibilitychecker (for familiarity).
-
 
150
        menu = addMenubarItem(menu, 'tools', 'a11ycheck', 'count');
-
 
151
        // Finally, hide tiny_accessibilitychecker so there is no confusion.
-
 
152
        menu = removeMenubarItem(menu, 'tools', 'tiny_accessibilitychecker');
-
 
153
    }
Línea 136... Línea 154...
136
 
154
 
137
    return {
155
    return {
138
        plugins,
156
        plugins,
139
        toolbar,
157
        toolbar,