mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 11:46:19 +01:00
Merge branch 'MDL-83668-405' of https://github.com/srobotta/moodle into MOODLE_405_STABLE
This commit is contained in:
commit
212dbbade5
2
lib/editor/tiny/amd/build/editor.min.js
vendored
2
lib/editor/tiny/amd/build/editor.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -257,7 +257,7 @@ const getStandardConfig = (target, tinyMCE, options, plugins) => {
|
||||
|
||||
// Add specific rules to the valid elements.
|
||||
// eslint-disable-next-line camelcase
|
||||
extended_valid_elements: 'script[*],p[*],i[*]',
|
||||
extended_valid_elements: options.extended_valid_elements,
|
||||
|
||||
// Disable XSS Sanitisation.
|
||||
// We do this in PHP.
|
||||
|
@ -178,6 +178,7 @@ class editor extends \texteditor {
|
||||
'currentLanguage' => current_language(),
|
||||
|
||||
'branding' => property_exists($siteconfig, 'branding') ? !empty($siteconfig->branding) : true,
|
||||
'extended_valid_elements' => $siteconfig->extended_valid_elements ?? 'script[*],p[*],i[*]',
|
||||
|
||||
// Language options.
|
||||
'language' => [
|
||||
|
@ -28,6 +28,8 @@ $string['settings'] = 'General settings';
|
||||
$string['privacy:reason'] = 'The TinyMCE editor does not store any preferences or user data.';
|
||||
$string['branding'] = 'TinyMCE branding';
|
||||
$string['branding_desc'] = 'Support TinyMCE by displaying the logo in the bottom corner of the text editor. The logo links to the TinyMCE website.';
|
||||
$string['extended_valid_elements'] = 'Extended valid elements';
|
||||
$string['extended_valid_elements_desc'] = 'This allows you to use additional HTML elements and attributes in the editor.';
|
||||
$string['plugin_enabled'] = '{$a} enabled.';
|
||||
$string['plugin_disabled'] = '{$a} disabled.';
|
||||
$string['subplugintype_tiny'] = 'TinyMCE plugin';
|
||||
|
@ -43,6 +43,15 @@ if ($ADMIN->fulltree) {
|
||||
);
|
||||
|
||||
$settings->add($setting);
|
||||
|
||||
$setting = new admin_setting_configtext(
|
||||
'editor_tiny/extended_valid_elements',
|
||||
new lang_string('extended_valid_elements', 'editor_tiny'),
|
||||
new lang_string('extended_valid_elements_desc', 'editor_tiny'),
|
||||
'script[*],p[*],i[*]'
|
||||
);
|
||||
|
||||
$settings->add($setting);
|
||||
}
|
||||
|
||||
// Note: We add editortiny to the settings page here manually rather than deferring to the plugininfo class.
|
||||
|
@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2024100700; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2024100701; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2024100100;
|
||||
$plugin->component = 'editor_tiny'; // Full name of the plugin (used for diagnostics).
|
||||
|
Loading…
x
Reference in New Issue
Block a user