1921 Commits

Author SHA1 Message Date
Andrew Nicols
c7b1cf2651
MDL-78251 tiny: Reduce use of UI for setting test expectations 2023-08-21 20:23:19 +08:00
Huong Nguyen
ff8b735d4f
Merge branch 'MDL-78436-master' of https://github.com/kevpercy/moodle 2023-08-21 09:45:57 +07:00
Andrew Nicols
44f0b4beef
MDL-78251 editor_tiny: Update TinyMCE to 6.6.2
Originally I changed the compiled output of TinyMCE from es2015 to es6
to try and allow our own requirejs system to serve the content.

This is a change in the TinyMCE repository (or our copy of it).

Unfortunately this turned out to not be possible, but I never got around
to updating the configuration to stop doing so.

Whilst working on this issue, I've removed this change to module
compilation, which brings us closer in line to Tiny core, and simplifies
the upgrade process.
2023-08-20 23:09:04 +08:00
Matt Porritt
fb4ffa5d53 MDL-79066 TinyMCE: Add fullscreen button
Enable the existing fullscreen functionality to be able
to be accessed from a button on the default editor toolbar.
2023-08-18 16:02:10 +10:00
Ilya Tregubov
0b5d35856d
NOBUG: Fixed file access permissions 2023-08-18 11:23:49 +08:00
Andrew Nicols
b8f94dffdd
Merge branch 'master_MDL-78613' of https://github.com/mattporritt/moodle 2023-08-17 09:11:46 +02:00
Kevin Percy
7db066a823 MDL-78436 editor_tiny: mform disabledIf works with TinyMCE 2023-08-15 14:15:07 +08:00
Jun Pataleta
c3a27a0070
Merge branch 'MDL-77817-master' of https://github.com/meirzamoodle/moodle 2023-08-10 18:32:15 +07:00
Ilya Tregubov
3b23a296b7
Merge branch 'MDL-78714-master' of https://github.com/andrewnicols/moodle 2023-08-09 12:04:45 +08:00
Andrew Nicols
9f9814ae41
MDL-78714 editor_tiny: Disable HTML Sanitisation in TinyMCE
This is in keeping with other Editors such as Atto and resolves an issue
where DOM Purification incorrectly identifies HTML-like string content
as an HTML tag with a JS variable.

Moodle already performs XSS sanitisation using HTML Purifier in PHP.
2023-08-09 09:07:04 +08:00
Andrew Nicols
8e58a8fab0
MDL-78714 editor_tiny: Add xss_sanitize option to TinyMCE
To address a potential data loss issue, a feature introduced in TinyMCE
6.4.0 to disable client-side XSS sanitisation must be backported.
2023-08-09 09:05:25 +08:00
Andrew Nicols
3c9a5589b7
MDL-78714 editor_tiny: Move TinyMCE import instructions to correct path 2023-08-09 09:05:23 +08:00
Sara Arjona
3774059c1b
Merge branch 'MDL-78770-master' of https://github.com/junpataleta/moodle 2023-08-08 13:55:26 +02:00
meirzamoodle
e039eaa599 MDL-77817 editor_tiny: Fix menu and dialogue window position
The boost theme makes the TinyMCE editor rendered in a scrollable container,
scrolling the editor’s container will cause TinyMCE UI elements to be detached from the anchor.
Therefore, to keep the tinyMCE menu in the correct position,
adjustments must be made on the page drawers style.

When using TinyMCE editor in Safari browsers, a problem may occur where the dialogue
windows (such as modal dialogs) overlap with page drawers due to a specific behavior
in Safari's rendering. This function addresses the issue by adjusting the CSS overflow
property of the page drawers, ensuring they do not obscure the dialogue windows.
2023-08-03 11:31:28 +07:00
Matt Porritt
07e2b61128 MDL-78613 TinyMCE: Add source code formatting and styling
Add code formatting (indenting) as well as code style (tag color)
via a TinyMC plugin. To make it easier to make code edits when
viewing the editor content in source code view.
2023-08-03 13:43:40 +10:00
Andrew Nicols
d860566a50
MDL-77174 editor_atto: Drop unused dependency 2023-07-31 10:56:21 +08:00
Jun Pataleta
8764f03abf
MDL-78770 tiny_recordrtc: Use proper window.console.warn() function 2023-07-20 14:22:14 +08:00
Jun Pataleta
4c233cdc51
MDL-78770 atto_recordrtc: Use proper window.console.warn() function 2023-07-20 14:22:01 +08:00
Huong Nguyen
7add5faa9e
MDL-78391 atto_recordrtc: Fix recording issue with Chrome 2023-07-06 15:37:03 +07:00
Huong Nguyen
592e9590d0
MDL-78391 tiny_recordrtc: Fix recording issue with Chrome 2023-07-06 15:33:38 +07:00
Jun Pataleta
9c73441c4a
Merge branch 'MDL-78391-master' of https://github.com/andrewnicols/moodle 2023-07-06 11:59:04 +08:00
Ilya Tregubov
048edee1e2
Merge branch 'MDL-74301-master' of https://github.com/kabalin/moodle 2023-07-06 09:06:31 +08:00
Ilya Tregubov
f8a65969a4
Merge branch 'MDL-78485-master' of https://github.com/stevandoMoodle/moodle 2023-07-05 11:51:23 +08:00
Stevani Andolo
c2be53493d MDL-78485 editor_tiny: Allowed script tag to be added in tinyMCE editor 2023-07-04 13:36:10 +08:00
Ruslan Kabalin
80a111d25e MDL-74301 eslint: Address issues reported by eslint 2023-07-03 15:21:53 +01:00
Andrew Nicols
2d56e0df66
MDL-78391 atto_recordrtc: Improve MacOS codec compatability 2023-07-03 16:52:28 +08:00
Andrew Nicols
a6e697c8a4
MDL-78391 tiny_recordrtc: Set filename according to container 2023-07-03 16:52:26 +08:00
Andrew Nicols
323f5237de
MDL-78391 tiny_recordrtc: Switch to mp4 container for h264
The recommendation at
https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers
is to use webm with an mp4 fallback.

General purpose video, preferably in an open format
WebM (ideally with MP4 fallback)
2023-07-03 16:52:07 +08:00
Andrew Nicols
bb44b2a1c6
MDL-78391 tiny_recordrtc: Improve codec selection
From my experimentation I have discovered that Safari does not properly
respect the standard MediaRecorder mimetype. Instead of using `codecs=`
it uses `codecs:`.

This change copies the codec array to have the list of possible codecs
include both codecs= and codecs: whilst remaining in order.
2023-07-03 16:50:14 +08:00
Andrew Nicols
5fd2b9d4bd
MDL-78391 tiny_recordrtc: Respect codec options
The audio and video plugins were overriding the wrong method, and thus
preventing selection of a relevant codec and breaking playback on some
devices.
2023-07-03 16:50:11 +08:00
Andrew Nicols
fab0fa5dfc
MDL-76853 editor_tiny: Refactor behat helpers into trait 2023-07-03 09:38:08 +08:00
Andrew Nicols
b49b76c41c
Merge branch 'MDL-78237-master' of https://github.com/davewoloszyn/moodle 2023-06-24 23:21:21 +08:00
Andrew Nicols
8be9cc3867
Merge branch 'MDL-76673-master' of https://github.com/meirzamoodle/moodle 2023-06-24 22:41:52 +08:00
David Woloszyn
32316df646 MDL-75913 behat: Switch to TinyMCE editor iframe 2023-06-19 16:35:46 +10:00
Andrew Nicols
77b4d0236f
MDL-78306 core: Provide helper method to register modals classes 2023-06-14 21:41:49 +08:00
David Woloszyn
5b9a452263 MDL-78237 editor_tiny: Prevent navbar obscuring modal content 2023-06-08 17:14:23 +10:00
Meirza
6be248016f MDL-76673 atto: Check color contrast only on elements that have text
If the content in Atto is wrapped by an element with only a background color, without text color,
the accessibility checker will use the parent text-color as the foreground color, which is owned by form-control,
it becomes a problem if the wrapped element background using #34274f and the parent text-color is #495057 then
the low contrast as a result.

To avoid such a situation, the patch will only calculate color contrast if only the element has text,
so it will give results per element if the accessibility checker is unsatisfied.
2023-05-27 13:56:18 +07:00
Meirza
ff22a6e221 MDL-76673 tiny: Check color contrast only on elements that have text
If the content in Tiny is wrapped by an element with only a background color, without text color,
the accessibility checker will use the parent text-color as the foreground color, which is owned by form-control,
it becomes a problem if the wrapped element background using #34274f and the parent text-color is #495057 then
the low contrast as a result.

To avoid such a situation, the patch will only calculate color contrast if only the element has text,
so it will give results per element if the accessibility checker is unsatisfied.

The patch also changes the selected element from 'body > *' to 'body *',
so it will return all elements (parents and children) in the content instead of parents only.

And minor modifications on the warning_content.mustache to fix the numbering format.
2023-05-27 13:56:18 +07:00
Jun Pataleta
d78de537ff Merge branch 'MDL-78005-master' of https://github.com/davewoloszyn/moodle 2023-05-24 12:06:52 +08:00
David Woloszyn
da81f260f0 MDL-78005 editor_tiny: Declared vars to supress error logging 2023-05-18 12:57:56 +10:00
Jun Pataleta
ad82a95633 Merge branch 'MDL-78065-master' of https://github.com/HuongNV13/moodle 2023-05-09 22:42:42 +08:00
Sara Arjona
29102c91b9 Merge branch 'MDL-77858' of https://github.com/paulholden/moodle 2023-05-02 16:49:43 +02:00
Huong Nguyen
3ac2f99ca3 MDL-78065 tiny_link: Fix cannot create link for selection text 2023-05-02 10:23:07 +07:00
Paul Holden
b495ba0cec
Merge branch 'MDL-78007-master' of https://github.com/HuongNV13/moodle 2023-04-25 12:36:07 +01:00
Paul Holden
8a6065f5fc
MDL-77858 javascript: correct core/notification exception imports. 2023-04-24 10:44:07 +01:00
Huong Nguyen
1d4c1d9c65 MDL-78007 tiny_media: Fix wrong condition for the Tiny Media
Including in this commit:
 - Switched to Tiny editor in manually_mark_question.feature
2023-04-24 15:53:41 +07:00
Jun Pataleta
9095bb0ef9 MDL-78000 upgrade: add the 4.2.0 separation line to all upgrade scripts 2023-04-22 23:17:50 +08:00
Jun Pataleta
e07f28e276 Merge branch 'MDL-77896' of https://github.com/paulholden/moodle 2023-04-21 11:21:40 +08:00
Paul Holden
571292b6eb
MDL-77896 editor_tiny: approximate height for non-visible editors.
When an editor is renderer initially invisible to the browser, e.g.
the forum "Add discussion" form, it has a `clientHeight` value of
zero. We can approximate an alternative value based on the number
of rows in the textarea.

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2023-04-20 15:24:23 +01:00
Andrew Nicols
59d42e1ed2 MDL-77718 editor_tiny: Restrict the revision to int for loaders
The revision should always be an int. I suspect this was missed during
debugging and not corrected.
2023-04-19 16:44:19 +00:00