Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Make CodeMirror work in repeatable subforms #12542
Pull Request for Issue # .
Summary of Changes
Each instance of CodeMirror has an initialization function specific to its id which runs on page load. This doesn't work for CodeMirror instances that should appear within subforms since they may not exist when the page loads and their ids are added dynamically.
One function to initialize any and all instances of CodeMirror. Runs once on page load and again on
Use CodeMirror without subform and expect it to work as usual.
Documentation Changes Required
can we please split the things?
Here do the fix only for CodeMiror and Chosen do separately, as there already some tricky code to init chosen https://github.com/joomla/joomla-cms/blob/staging/media/system/js/subform-repeatable-uncompressed.js#L230 and it need to be removed if there a better way to do it.