diff --git a/lib/editor/atto/plugins/html/thirdpartylibs.xml b/lib/editor/atto/plugins/html/thirdpartylibs.xml
index 1ef4c0ec0aa..6baba0ca1fb 100644
--- a/lib/editor/atto/plugins/html/thirdpartylibs.xml
+++ b/lib/editor/atto/plugins/html/thirdpartylibs.xml
@@ -4,7 +4,7 @@
yui/src/codemirror
codemirror
CodeMirror is a versatile text editor implemented in JavaScript for the browser.
- 5.65.12
+ 5.65.15
MIT
https://github.com/codemirror/codemirror5
diff --git a/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-codemirror/moodle-atto_html-codemirror-debug.js b/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-codemirror/moodle-atto_html-codemirror-debug.js
index 03dd921dd45..91732ef20b3 100644
--- a/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-codemirror/moodle-atto_html-codemirror-debug.js
+++ b/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-codemirror/moodle-atto_html-codemirror-debug.js
@@ -9871,7 +9871,7 @@ var define = null; // Remove require.js support in this context.
addLegacyProps(CodeMirror);
- CodeMirror.version = "5.65.12";
+ CodeMirror.version = "5.65.15";
return CodeMirror;
diff --git a/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-codemirror/moodle-atto_html-codemirror-min.js b/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-codemirror/moodle-atto_html-codemirror-min.js
index 5b29b57af79..7e408686ea6 100644
--- a/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-codemirror/moodle-atto_html-codemirror-min.js
+++ b/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-codemirror/moodle-atto_html-codemirror-min.js
@@ -26,7 +26,7 @@ left:n.display.lineDiv.offsetWidth+100,top:t},"div");return{from:e.from(),to:t}}
t.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},t.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},t.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||bi(this.cm,function(){return jr(e.cm)})},t.prototype.setUneditable=function(e){e.contentEditable="false"},t.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||wi(this.cm,kl)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},t.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},t.prototype.onContextMenu=function(){},t.prototype.resetPosition=function(){},t.prototype.needsContentAttribute=!0,(Re=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new p,this.hasSelection=!1,this.composing=null,this.resetting=!1}).prototype.init=function(n){var r,e=this,i=this,o=this.cm;function t(e){if(!Pt(o,e)){if(o.somethingSelected())xl({lineWise:!1,text:o.getSelections()});else{if(!o.options.lineWiseCopyCut)return;var t=Tl(o);xl({lineWise:!0,text:t.text}),"cut"==e.type?o.setSelections(t.ranges,null,v):(i.prevInput="",r.value=t.text.join("\n"),c(r))}"cut"==e.type&&(o.state.cutIncoming=+new Date)}}this.createField(n),r=this.textarea,n.wrapper.insertBefore(this.wrapper,n.wrapper.firstChild),Ze&&(r.style.width="0px"),w(r,"input",function(){x&&9<=Ke&&e.hasSelection&&(e.hasSelection=null),i.poll()}),w(r,"paste",function(e){Pt(o,e)||Cl(e,o)||(o.state.pasteIncoming=+new Date,i.fastPoll())}),w(r,"cut",t),w(r,"copy",t),w(n.scroller,"paste",function(e){if(!nr(n,e)&&!Pt(o,e)){if(!r.dispatchEvent)return o.state.pasteIncoming=+new Date,void i.focus();var t=new Event("paste");t.clipboardData=e.clipboardData,r.dispatchEvent(t)}}),w(n.lineSpace,"selectstart",function(e){nr(n,e)||Ft(e)}),w(r,"compositionstart",function(){var e=o.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:e,range:o.markText(e,o.getCursor("to"),{className:"CodeMirror-composing"})}}),w(r,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},Re.prototype.createField=function(e){this.wrapper=Ml(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Ll(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},Re.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Re.prototype.prepareSelection=function(){var e,t=this.cm,n=t.display,r=t.doc,i=_r(t);return t.options.moveInputWithCursor&&(t=Sr(t,r.sel.primary().head,"div"),r=n.wrapper.getBoundingClientRect(),e=n.lineDiv.getBoundingClientRect(),i.teTop=Math.max(0,Math.min(n.wrapper.clientHeight-10,t.top+e.top-r.top)),i.teLeft=Math.max(0,Math.min(n.wrapper.clientWidth-10,t.left+e.left-r.left))),i},Re.prototype.showSelection=function(e){var t=this.cm.display;it(t.cursorDiv,e.cursors),it(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Re.prototype.reset=function(e){var t,n;this.contextMenuPending||this.composing&&e||(t=this.cm,this.resetting=!0,t.somethingSelected()?(this.prevInput="",n=t.getSelection(),this.textarea.value=n,t.state.focused&&c(this.textarea),x&&9<=Ke&&(this.hasSelection=n)):e||(this.prevInput=this.textarea.value="",x&&9<=Ke&&(this.hasSelection=null)),this.resetting=!1)},Re.prototype.getField=function(){return this.textarea},Re.prototype.supportsTouch=function(){return!1},Re.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Je||at(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch(e){}},Re.prototype.blur=function(){this.textarea.blur()},Re.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Re.prototype.receivedFocus=function(){this.slowPoll()},Re.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Re.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))})},Re.prototype.poll=function(){var e,t,n,r,i=this,o=this.cm,l=this.textarea,a=this.prevInput;if(this.contextMenuPending||this.resetting||!o.state.focused||D(l)&&!a&&!this.composing||o.isReadOnly()||o.options.disableInput||o.state.keySeq)return!1;if((e=l.value)==a&&!o.somethingSelected())return!1;if(x&&9<=Ke&&this.hasSelection===e||et&&/[\uf700-\uf7ff]/.test(e))return o.display.input.reset(),!1;if(o.doc.sel==o.display.selForContextMenu&&(8203!=(t=e.charCodeAt(0))||a||(a=""),8666==t))return this.reset(),this.cm.execCommand("undo");for(n=0,r=Math.min(a.length,e.length);nl&&(wl(this,i.head.line,e,!0),l=i.head.line,a==this.doc.sel.primIndex&&li(this));else{for(t=i.from(),i=i.to(),n=Math.max(l,t.line),l=Math.min(this.lastLine(),i.line-(i.ch?0:1))+1,r=n;r>1)?t[2*l-1]:0)>=i)r=l;else{if(!(t[2*l+1]l)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(s=e.bottom),c+t.offsetWidth>o&&(c=o-t.offsetWidth)),t.style.top=s+"px",t.style.left=t.style.right="","right"==i?(c=a.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?c=0:"middle"==i&&(c=(a.sizer.clientWidth-t.offsetWidth)/2),t.style.left=c+"px"),n&&(r=this,l={left:c,top:s,right:c+t.offsetWidth,bottom:s+t.offsetHeight},null!=(l=ii(r,l)).scrollTop&&ui(r,l.scrollTop),null!=l.scrollLeft&&hi(r,l.scrollLeft))},triggerOnKeyDown:xi(sl),triggerOnKeyPress:xi(ul),triggerOnKeyUp:cl,triggerOnMouseDown:xi(dl),execCommand:function(e){if(me.hasOwnProperty(e))return me[e].call(null,this)},triggerElectric:xi(function(e){Sl(this,e)}),findPosH:function(e,t,n,r){var i,o,l=1;for(t<0&&(l=-1,t=-t),i=O(this.doc,e),o=0;o","i")}function o(e,t){var n,r,i,o;for(n in e)for(r=t[n]||(t[n]=[]),o=(i=e[n]).length-1;0<=o;o--)r.unshift(i[o])}n={},d.defineMode("htmlmixed",function(a,e){var t,s=d.getMode(a,{name:"xml",htmlMode:!0,multilineTagIndentFactor:e.multilineTagIndentFactor,multilineTagIndentPastTag:e.multilineTagIndentPastTag,allowMissingTagName:e.allowMissingTagName}),c={},n=e&&e.tags,r=e&&e.scriptTypes;if(o(i,c),n&&o(n,c),r)for(t=r.length-1;0<=t;t--)c.script.unshift(["type",r[t].matches,r[t].mode]);function u(e,t){var n,o,l,r=s.token(e,t.htmlState),i=/\btag\b/.test(r);return i&&!/[<>\s\/]/.test(e.current())&&(n=t.htmlState.tagName&&t.htmlState.tagName.toLowerCase())&&c.hasOwnProperty(n)?t.inTag=n+" ":t.inTag&&i&&/>$/.test(e.current())?(n=/^([\S]+) (.*)/.exec(t.inTag),t.inTag=null,i=">"==e.current()&&function(e,t){for(var n,r=0;r","i")}function o(e,t){var n,r,i,o;for(n in e)for(r=t[n]||(t[n]=[]),o=(i=e[n]).length-1;0<=o;o--)r.unshift(i[o])}n={},d.defineMode("htmlmixed",function(a,e){var t,s=d.getMode(a,{name:"xml",htmlMode:!0,multilineTagIndentFactor:e.multilineTagIndentFactor,multilineTagIndentPastTag:e.multilineTagIndentPastTag,allowMissingTagName:e.allowMissingTagName}),c={},n=e&&e.tags,r=e&&e.scriptTypes;if(o(i,c),n&&o(n,c),r)for(t=r.length-1;0<=t;t--)c.script.unshift(["type",r[t].matches,r[t].mode]);function u(e,t){var n,o,l,r=s.token(e,t.htmlState),i=/\btag\b/.test(r);return i&&!/[<>\s\/]/.test(e.current())&&(n=t.htmlState.tagName&&t.htmlState.tagName.toLowerCase())&&c.hasOwnProperty(n)?t.inTag=n+" ":t.inTag&&i&&/>$/.test(e.current())?(n=/^([\S]+) (.*)/.exec(t.inTag),t.inTag=null,i=">"==e.current()&&function(e,t){for(var n,r=0;r")):null:t.match("--")?r(p("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),r(function i(r){return function(e,t){for(var n;null!=(n=e.next());){if("<"==n)return t.tokenize=i(r+1),t.tokenize(e,t);if(">"==n){if(1!=r)return t.tokenize=i(r-1),t.tokenize(e,t);t.tokenize=s;break}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),n.tokenize=p("meta","?>"),"meta"):(o=t.eat("/")?"closeTag":"openTag",n.tokenize=f,"tag bracket"):"&"==e?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function f(e,t){var n,r,i=e.next();return">"==i||"/"==i&&e.eat(">")?(t.tokenize=s,o=">"==i?"endTag":"selfcloseTag","tag bracket"):"="==i?(o="equals",null):"<"==i?(t.tokenize=s,t.state=u,t.tagName=t.tagStart=null,(r=t.tokenize(e,t))?r+" tag error":"tag error"):/[\'\"]/.test(i)?(t.tokenize=(n=i,(r=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=f;break}return"string"}).isInAttribute=!0,r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function p(n,r){return function(e,t){for(;!e.eol();){if(e.match(r)){t.tokenize=s;break}e.next()}return n}}function c(e){return e&&e.toLowerCase()}function g(e,t,n){this.prev=e.context,this.tagName=t||"",this.indent=e.indented,this.startOfLine=n,(a.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function m(e){e.context&&(e.context=e.context.prev)}function y(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!a.contextGrabbers.hasOwnProperty(c(n))||!a.contextGrabbers[c(n)].hasOwnProperty(c(t)))return;m(e)}}function u(e,t,n){return"openTag"==e?(n.tagStart=t.column(),v):"closeTag"==e?b:u}function v(e,t,n){return"word"==e?(n.tagName=t.current(),l="tag",d):a.allowMissingTagName&&"endTag"==e?(l="tag bracket",d(e,0,n)):(l="error",v)}function b(e,t,n){var r;return"word"==e?(r=t.current(),n.context&&n.context.tagName!=r&&a.implicitlyClosed.hasOwnProperty(c(n.context.tagName))&&m(n),n.context&&n.context.tagName==r||!1===a.matchClosing?(l="tag",i):(l="tag error",w)):a.allowMissingTagName&&"endTag"==e?(l="tag bracket",i(e,0,n)):(l="error",w)}function i(e,t,n){return"endTag"!=e?(l="error",i):(m(n),u)}function w(e,t,n){return l="error",i(e,0,n)}function d(e,t,n){return"word"==e?(l="attribute",x):"endTag"==e||"selfcloseTag"==e?(r=n.tagName,i=n.tagStart,n.tagName=n.tagStart=null,"selfcloseTag"==e||a.autoSelfClosers.hasOwnProperty(c(r))?y(n,r):(y(n,r),n.context=new g(n,r,i==n.indented)),u):(l="error",d);var r,i}function x(e,t,n){return"equals"==e?k:(a.allowMissing||(l="error"),d(e,0,n))}function k(e,t,n){return"string"==e?C:"word"==e&&a.allowUnquoted?(l="string",d):(l="error",d(e,0,n))}function C(e,t,n){return"string"==e?C:d(e,0,n)}return s.isInText=!0,{startState:function(e){var t={tokenize:s,state:u,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var n=t.tokenize(e,t);return(n||o)&&"comment"!=n&&(l=null,t.state=t.state(o||n,e,t),l&&(n="error"==l?n+" error":l)),n},indent:function(e,t,n){var r,i,o=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+h;if(o&&o.noIndent)return S.Pass;if(e.tokenize!=f&&e.tokenize!=s)return n?n.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==a.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+h*(a.multilineTagIndentFactor||1);if(a.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:a.htmlMode?"html":"xml",helperType:a.htmlMode?"html":"xml",skipAttribute:function(e){e.state==k&&(e.state=d)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)t.push(n.tagName);return t.reverse()}}}),S.defineMIME("text/xml","xml"),S.defineMIME("application/xml","xml"),S.mimeModes.hasOwnProperty("text/html")||S.defineMIME("text/html",{name:"xml",htmlMode:!0})},"object"==typeof exports&&"object"==typeof module?r(require("../../lib/codemirror")):r(n),r=function(nt){"use strict";nt.defineMode("javascript",function(t,p){var r,i,g,a,n,m,y,v,b,w=t.indentUnit,x=p.statementIndent,k=p.jsonld,C=p.json||k,S=!1!==p.trackScope,c=p.typescript,T=p.wordCharacters||/[\w$\xa1-\uffff]/,L=(t=e("keyword a"),m=e("keyword b"),y=e("keyword c"),v=e("keyword d"),b=e("operator"),{"if":e("if"),"while":t,"with":t,"else":m,"do":m,"try":m,"finally":m,"return":v,"break":v,"continue":v,"new":e("new"),"delete":y,"void":y,"throw":y,"debugger":e("debugger"),"var":e("var"),"const":e("var"),"let":e("var"),"function":e("function"),"catch":e("catch"),"for":e("for"),"switch":e("switch"),"case":e("case"),"default":e("default"),"in":b,"typeof":b,"instanceof":b,"true":t={type:"atom",style:"atom"},"false":t,"null":t,undefined:t,NaN:t,Infinity:t,"this":e("this"),"class":e("class"),"super":e("atom"),"yield":y,"export":e("export"),"import":e("import"),"extends":y,"await":y}),M=/[+\-*&%=<>!?|~^@]/,N=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function e(e){return{type:e,style:"keyword"}}function A(e,t,n){return r=e,i=n,t}function O(e,t){var i,n=e.next();if('"'==n||"'"==n)return t.tokenize=(i=n,function(e,t){var n,r=!1;if(k&&"@"==e.peek()&&e.match(N))return t.tokenize=O,A("jsonld-keyword","meta");for(;null!=(n=e.next())&&(n!=i||r);)r=!r&&"\\"==n;return r||(t.tokenize=O),A("string","string")}),t.tokenize(e,t);if("."==n&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return A("number","number");if("."==n&&e.match(".."))return A("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return A(n);if("="==n&&e.eat(">"))return A("=>","operator");if("0"==n&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return A("number","number");if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),A("number","number");if("/"==n)return e.eat("*")?(t.tokenize=D)(e,t):e.eat("/")?(e.skipToEnd(),A("comment","comment")):tt(e,t,1)?(function(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),A("regexp","string-2")):(e.eat("="),A("operator","operator",e.current()));if("`"==n)return(t.tokenize=z)(e,t);if("#"==n&&"!"==e.peek())return e.skipToEnd(),A("meta","meta");if("#"==n&&e.eatWhile(T))return A("variable","property");if("<"==n&&e.match("!--")||"-"==n&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),A("comment","comment");if(M.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-|&?]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),"?"==n&&e.eat(".")?A("."):A("operator","operator",e.current());if(T.test(n)){if(e.eatWhile(T),n=e.current(),"."!=t.lastType){if(L.propertyIsEnumerable(n))return A((t=L[n]).type,t.style,n);if("async"==n&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return A("async","keyword",n)}return A("variable","variable",n)}}function D(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=O;break}r="*"==n}return A("comment","comment")}function z(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=O;break}r=!r&&"\\"==n}return A("quasi","string-2",e.current())}function W(e,t){var n,r,i,o,l,a,s;if(t.fatArrowAt&&(t.fatArrowAt=null),!((n=e.string.indexOf("=>",e.start))<0)){for(i=0,o=!1,l=(n=c&&(r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n)))?r.index:n)-1;0<=l;--l)if(a=e.string.charAt(l),0<=(s="([{}])".indexOf(a))&&s<3){if(!i){++l;break}if(0==--i){"("==a&&(o=!0);break}}else if(3<=s&&s<6)++i;else if(T.test(a))o=!0;else if(/["'\/`]/.test(a))for(;;--l){if(0==l)return;if(e.string.charAt(l-1)==a&&"\\"!=e.string.charAt(l-2)){l--;break}}else if(o&&!i){++l;break}o&&!i&&(t.fatArrowAt=l)}}function P(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function E(e,t,n,r,i){var o=e.cc;for(a.state=e,a.stream=i,a.marked=null,a.cc=o,a.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():C?l:G)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return a.marked?a.marked:"variable"==n&&function(e,t){var n,r;if(S){for(n=e.localVars;n;n=n.next)if(n.name==t)return 1;for(r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return 1}}(e,r)?"variable-2":t}}function s(){for(var e=arguments.length-1;0<=e;e--)a.cc.push(arguments[e])}function u(){return s.apply(null,arguments),!0}function H(e,t){for(var n=t;n;n=n.next)if(n.name==e)return 1}function I(e){var t,n=a.state;if(a.marked="def",S){if(n.context)if("var"==n.lexical.info&&n.context&&n.context.block){if(null!=(t=function r(e,t){{var n;return t?t.block?(n=r(e,t.prev))?n==t.prev?t:new R(n,t.vars,!0):null:H(e,t.vars)?t:new R(t.prev,new B(e,t.vars),!1):null}}(e,n.context)))return void(n.context=t)}else if(!H(e,n.localVars))return void(n.localVars=new B(e,n.localVars));p.globalVars&&!H(e,n.globalVars)&&(n.globalVars=new B(e,n.globalVars))}}function F(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function R(e,t,n){this.prev=e,this.vars=t,this.block=n}function B(e,t){this.name=e,this.next=t}function j(){
a.state.context=new R(a.state.context,a.state.localVars,!1),a.state.localVars=n}function V(){a.state.context=new R(a.state.context,a.state.localVars,!0),a.state.localVars=null}function K(){a.state.localVars=a.state.context.vars,a.state.context=a.state.context.prev}function o(r,i){var e=function(){var e,t=a.state,n=t.indented;if("stat"==t.lexical.type)n=t.lexical.indented;else for(e=t.lexical;e&&")"==e.type&&e.align;e=e.prev)n=e.indented;t.lexical=new P(n,a.stream.column(),r,null,t.lexical,i)};return e.lex=!0,e}function d(){var e=a.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function h(t){return function n(e){return e==t?u():";"==t||"}"==e||")"==e||"]"==e?s():u(n)}}function G(e,t){return"var"==e?u(o("vardef",t),Le,h(";"),d):"keyword a"==e?u(o("form"),_,G,d):"keyword b"==e?u(o("form"),G,d):"keyword d"==e?a.stream.match(/^\s*$/,!1)?u():u(o("stat"),X,h(";"),d):"debugger"==e?u(h(";")):"{"==e?u(o("}"),V,de,d,K):";"==e?u():"if"==e?("else"==a.state.lexical.info&&a.state.cc[a.state.cc.length-1]==d&&a.state.cc.pop()(),u(o("form"),_,G,d,ze)):"function"==e?u(He):"for"==e?u(o("form"),V,We,G,K,d):"class"==e||c&&"interface"==t?(a.marked="keyword",u(o("form","class"==e?e:t),je,d)):"variable"==e?c&&"declare"==t?(a.marked="keyword",u(G)):c&&("module"==t||"enum"==t||"type"==t)&&a.stream.match(/^\s*\w/,!1)?(a.marked="keyword","enum"==t?u(Je):"type"==t?u(Fe,h("operator"),f,h(";")):u(o("form"),Me,h("{"),o("}"),de,d,d)):c&&"namespace"==t?(a.marked="keyword",u(o("form"),l,G,d)):c&&"abstract"==t?(a.marked="keyword",u(G)):u(o("stat"),ie):"switch"==e?u(o("form"),_,h("{"),o("}","switch"),V,de,d,d,K):"case"==e?u(l,h(":")):"default"==e?u(h(":")):"catch"==e?u(o("form"),j,U,G,d,K):"export"==e?u(o("stat"),Ue,d):"import"==e?u(o("stat"),_e,d):"async"==e?u(G):"@"==t?u(l,G):s(o("stat"),l,h(";"),d)}function U(e){if("("==e)return u(Re,h(")"))}function l(e,t){return $(e,t,!1)}function q(e,t){return $(e,t,!0)}function _(e){return"("!=e?s():u(o(")"),X,h(")"),d)}function $(e,t,n){var r,i;if(a.state.fatArrowAt==a.stream.start){if(r=n?te:ee,"("==e)return u(j,o(")"),ce(Re,")"),d,h("=>"),r,K);if("variable"==e)return s(j,Me,h("=>"),r,K)}return r=n?Z:Y,g.hasOwnProperty(e)?u(r):"function"==e?u(He,r):"class"==e||c&&"interface"==t?(a.marked="keyword",u(o("form"),Be,d)):"keyword c"==e||"async"==e?u(n?q:l):"("==e?u(o(")"),X,h(")"),d,r):"operator"==e||"spread"==e?u(n?q:l):"["==e?u(o("]"),Qe,d,r):"{"==e?ue(le,"}",null,r):"quasi"==e?s(Q,r):"new"==e?u((i=n,function(e){return"."==e?u(i?re:ne):"variable"==e&&c?u(Ce,i?Z:Y):s(i?q:l)})):u()}function X(e){return e.match(/[;\}\)\],]/)?s():s(l)}function Y(e,t){return","==e?u(X):Z(e,t,!1)}function Z(e,t,n){var r=0==n?Y:Z,i=0==n?l:q;return"=>"==e?u(j,n?te:ee,K):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?u(r):c&&"<"==t&&a.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?u(o(">"),ce(f,">"),d,r):"?"==t?u(l,h(":"),i):u(i):"quasi"==e?s(Q,r):";"!=e?"("==e?ue(q,")","call",r):"."==e?u(oe,r):"["==e?u(o("]"),X,h("]"),d,r):c&&"as"==t?(a.marked="keyword",u(f,r)):"regexp"==e?(a.state.lastType=a.marked="operator",a.stream.backUp(a.stream.pos-a.stream.start-1),u(i)):void 0:void 0}function Q(e,t){return"quasi"!=e?s():"${"!=t.slice(t.length-2)?u(Q):u(X,J)}function J(e){if("}"==e)return a.marked="string-2",a.state.tokenize=z,u(Q)}function ee(e){return W(a.stream,a.state),s("{"==e?G:l)}function te(e){return W(a.stream,a.state),s("{"==e?G:q)}function ne(e,t){if("target"==t)return a.marked="keyword",u(Y)}function re(e,t){if("target"==t)return a.marked="keyword",u(Z)}function ie(e){return":"==e?u(d,G):s(Y,h(";"),d)}function oe(e){if("variable"==e)return a.marked="property",u()}function le(e,t){return"async"==e?(a.marked="property",u(le)):"variable"!=e&&"keyword"!=a.style?"number"==e||"string"==e?(a.marked=k?"property":a.style+" property",u(se)):"jsonld-keyword"==e?u(se):c&&F(t)?(a.marked="keyword",u(le)):"["==e?u(l,he,h("]"),se):"spread"==e?u(q,se):"*"==t?(a.marked="keyword",u(le)):":"==e?s(se):void 0:(a.marked="property","get"==t||"set"==t?u(ae):(c&&a.state.fatArrowAt==a.stream.start&&(n=a.stream.match(/^\s*:\s*/,!1))&&(a.state.fatArrowAt=a.stream.pos+n[0].length),u(se)));var n}function ae(e){return"variable"!=e?s(se):(a.marked="property",u(He))}function se(e){return":"==e?u(q):"("==e?s(He):void 0}function ce(r,i,o){function l(e,t){var n;return(o?-1"),f):"quasi"==e?s(be,ke):void 0}function me(e){if("=>"==e)return u(f)}function ye(e){return e.match(/[\}\)\]]/)?u():","==e||";"==e?u(ye):s(ve,ye)}function ve(e,t){return"variable"==e||"keyword"==a.style?(a.marked="property",u(ve)):"?"==t||"number"==e||"string"==e?u(ve):":"==e?u(f):"["==e?u(h("variable"),fe,h("]"),ve):"("==e?s(Ie,ve):e.match(/[;\}\)\],]/)?void 0:u()}function be(e,t){return"quasi"!=e?s():"${"!=t.slice(t.length-2)?u(be):u(f,we)}function we(e){if("}"==e)return a.marked="string-2",a.state.tokenize=z,u(be)}function xe(e,t){return"variable"==e&&a.stream.match(/^\s*[?:]/,!1)||"?"==t?u(xe):":"==e?u(f):"spread"==e?u(xe):s(f)}function ke(e,t){return"<"==t?u(o(">"),ce(f,">"),d,ke
diff --git a/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-codemirror/moodle-atto_html-codemirror.js b/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-codemirror/moodle-atto_html-codemirror.js
index 03dd921dd45..91732ef20b3 100644
--- a/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-codemirror/moodle-atto_html-codemirror.js
+++ b/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-codemirror/moodle-atto_html-codemirror.js
@@ -9871,7 +9871,7 @@ var define = null; // Remove require.js support in this context.
addLegacyProps(CodeMirror);
- CodeMirror.version = "5.65.12";
+ CodeMirror.version = "5.65.15";
return CodeMirror;
diff --git a/lib/editor/atto/plugins/html/yui/src/codemirror/js/codemirror.js b/lib/editor/atto/plugins/html/yui/src/codemirror/js/codemirror.js
index b53a776aef9..156fc307dd9 100644
--- a/lib/editor/atto/plugins/html/yui/src/codemirror/js/codemirror.js
+++ b/lib/editor/atto/plugins/html/yui/src/codemirror/js/codemirror.js
@@ -9867,7 +9867,7 @@
addLegacyProps(CodeMirror);
- CodeMirror.version = "5.65.12";
+ CodeMirror.version = "5.65.15";
return CodeMirror;
diff --git a/lib/editor/atto/plugins/html/yui/src/codemirror/readme_moodle.txt b/lib/editor/atto/plugins/html/yui/src/codemirror/readme_moodle.txt
index abcdc60f431..6d3f8e9101a 100644
--- a/lib/editor/atto/plugins/html/yui/src/codemirror/readme_moodle.txt
+++ b/lib/editor/atto/plugins/html/yui/src/codemirror/readme_moodle.txt
@@ -3,15 +3,16 @@ Description of importing the codemirror library into Moodle.
NOTE: To make it more readable, in this explanation [LIBRARYPATH] means:
[PATH TO YOUR MOODLE]/lib/editor/atto/plugins/html/yui/src/codemirror
-1 Download the latest codemirror code somewhere (example /tmp/cm) using: npm install codemirror OR download the zip file
- (note down the version number displayed by the command, you'll need it later)
+1 Download the latest codemirror code somewhere (example /tmp/cm) using:
+
+mkdir -p codemirror/node_modules
+npm install --prefix codemirror codemirror@5 --save-dev
+
+Note down the version number displayed by the command, to update thirdpartylibs.xml accordingly.
2 Then copy the following files to your local Moodle directory:
-If using npm install:
-[CODEMIRRORPATH] = node_modules
-If using the zip file:
-[CODEMIRRORPATH] = codemirror-X.XX.X
+[CODEMIRRORPATH] = codemirror/node_modules
cp [CODEMIRRORPATH]/codemirror/lib/codemirror.js [LIBRARYPATH]/js
cp [CODEMIRRORPATH]/codemirror/mode/css/css.js [LIBRARYPATH]/js