All notable changes to this project will be documented in this file.
- Handle PHP >= 8.1 enums properly
- Update to
"monaco-editor": "^0.50.0"
- Removes errors when editing CSS code that contains native CSS nesting or
:has()
selectors monaco-editor #4071
- Fixed an issue where the autocomplete endpoint could throw a
500
error when attempting to parse properties such as thesso
property with an insufficient edition of Craft
- Stable release for Craft CMS 5
- Fixed an issue that would cause the
SectionShorthandFieldsAutocomplete
to throw an exception if you were running PHP < 8.0 (#7) - Prefix the generated Tailwind CSS (which ironically, we're not using anyway) with
craft-code-editor-
to avoid namespace collisions (#8)
- Compatibility with Craft CMS 5
- Add
phpstan
andecs
code linting - Add
code-analysis.yaml
GitHub action
- PHPstan code cleanup
- ECS code cleanup
- Use
getSections()
for Craft 3 & 4, and usegetEntries()
for Craft 5
- Update to
"monaco-editor": "^0.44.0"
- Fixed an issue where the global
monaco
API object was no longer set properly by theglobalAPI: true
config setting, so we now manually set it on thewindow
variable
- Fixed a regression that would cause the content height to be set to
50px
by default, when it should be growing to fix the available content
- Added a
maxEditorRows
setting toCodeEditorOptions
to allow you to control the maximum number of rows before the editor is fixed height, and has a scrollbar - Update for Craft CMS
^5.0.0-alpha.1
- Revert checking to see if any models exist before creating them, to allow for multiple instantiation of the same URI... because as implemented, it doesn't allow multiple instances of the editor on the same page
- Check to see if any models exist before creating them, to allow for multiple instantiation of the same URI
- Add
fixedHeightEditor
setting toCodeEditorOptions
to allow for a scrolling editor in a fixed height frame inherited from the parent container
- Add a
CodeEditorOptions.fileName
so that the name of the file to be edited can be passed down, and used for themodelUri
so Monaco can auto-detect the correct editor to use based on the file extension
- The default
lineNumbersMinChars
option value is no longer set to0
.
- Updated assets build with the latest deps
- Add a unique
modelUri
to each editor model
- Allow scrollbars for text editors instances that are not single line editors
- Set the minimum editor size to the
textarea
's rows, so you have control over the minimum height of the editor - Set the maximum number of rows in the editor to 50, after which scrollbars appear
- Remove reference to
Craft.
so the JavaScript will work on the frontend
- Set the default theme before the editor is instantiated, as an optimization
- Switched to doing tab handling for single line editors via
TabFocus
rather than our own custom tab handler (ref) - Change the opacity of the placeholder text to make it lighter in appearance
- Added an
allowTemplateAccess
setting toconfig.php
to separate frontend template access from frontend autocomplete controller access
- Use
--focus-ring
Craft CMS CSS variable for a11y styles
- Added support for
monacoOptions.theme
set toauto
automatically setting the theme to match the browser's dark mode setting
- Added a JSON icon
- Added a default fallback icon if no custom icon is available
- Initial release