Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 21... Línea 21...
21
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
21
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
22
 */
22
 */
Línea 23... Línea 23...
23
 
23
 
24
import jQuery from 'jquery';
24
import jQuery from 'jquery';
25
import Pending from 'core/pending';
25
import Pending from 'core/pending';
26
import {getDefaultConfiguration} from './defaults';
26
import {getDefaultConfiguration, getDefaultQuickbarsSelectionToolbar} from './defaults';
27
import {getTinyMCE, baseUrl} from './loader';
27
import {getTinyMCE, baseUrl} from './loader';
28
import * as Options from './options';
28
import * as Options from './options';
29
import {addToolbarButton, addToolbarButtons, addToolbarSection,
29
import {addToolbarButton, addToolbarButtons, addToolbarSection,
Línea 269... Línea 269...
269
        // Disable quickbars entirely.
269
        // Disable quickbars entirely.
270
        // The UI is not ideal and we'll wait for it to improve in future before we enable it in Moodle.
270
        // The UI is not ideal and we'll wait for it to improve in future before we enable it in Moodle.
271
        // eslint-disable-next-line camelcase
271
        // eslint-disable-next-line camelcase
272
        quickbars_insert_toolbar: '',
272
        quickbars_insert_toolbar: '',
Línea -... Línea 273...
-
 
273
 
-
 
274
        // If the target element is too small, disable the quickbars selection toolbar.
-
 
275
        // The quickbars selection toolbar is not displayed correctly if the target element is too small.
-
 
276
        // See: https://github.com/tinymce/tinymce/issues/9693.
-
 
277
        quickbars_selection_toolbar: target.rows > 5 ? getDefaultQuickbarsSelectionToolbar() : false,
273
 
278
 
274
        // Override the standard block formats property (removing h1 & h2).
279
        // Override the standard block formats property (removing h1 & h2).
275
        // https://www.tiny.cloud/docs/tinymce/6/user-formatting-options/#block_formats
280
        // https://www.tiny.cloud/docs/tinymce/6/user-formatting-options/#block_formats
276
        // eslint-disable-next-line camelcase
281
        // eslint-disable-next-line camelcase
Línea 406... Línea 411...
406
 
411
 
407
            // Remove any duplicate separators.
412
            // Remove any duplicate separators.
408
            .replaceAll(/\| *\|/g, '|');
413
            .replaceAll(/\| *\|/g, '|');
Línea -... Línea 414...
-
 
414
    }
409
    }
415
 
410
 
416
    if (instanceConfig.quickbars_selection_toolbar !== false) {
-
 
417
        // eslint-disable-next-line camelcase
Línea 411... Línea 418...
411
    // eslint-disable-next-line camelcase
418
        instanceConfig.quickbars_selection_toolbar = instanceConfig.quickbars_selection_toolbar.replace('h2 h3', 'h3 h4 h5 h6');
412
    instanceConfig.quickbars_selection_toolbar = instanceConfig.quickbars_selection_toolbar.replace('h2 h3', 'h3 h4 h5 h6');
419
    }
413
 
420
 
414
    // Next we call the `configure` function for any plugin which defines it.
421
    // Next we call the `configure` function for any plugin which defines it.