Skip to content

Commit

Permalink
Merge branch 'release/2.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
jalendport committed Dec 2, 2022
2 parents 8fae161 + 207a353 commit 68a0abc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 2.0.1 - 2022-12-02
### Changed
- Updated to use craft-code-editor instead of craft-twigfield ([#87](https://github.com/besteadfast/craft-preparse-field/pull/87) - thanks @khalwat)

## 2.0.0 - 2022-08-08
### Added
- Initial Craft 4 release

## 1.4.1 - 2022-12-02
### Changed
- Updated to use craft-code-editor instead of craft-twigfield ([#86](https://github.com/besteadfast/craft-preparse-field/pull/86) - thanks @khalwat)

## 1.4.0 - 2022-08-08
### Added
- Added support for craft-twigfield ([#81](https://github.com/besteadfast/craft-preparse-field/pull/81) - thanks @khalwat)
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "besteadfast/craft-preparse-field",
"description": "A fieldtype that parses Twig when an element is saved and saves the result as plain text.",
"type": "craft-plugin",
"version": "2.0.0",
"version": "2.0.1",
"keywords": [
"craft",
"cms",
Expand All @@ -29,7 +29,7 @@
],
"require": {
"craftcms/cms": "^4.0.0",
"nystudio107/craft-twigfield": "^1.0.0",
"nystudio107/craft-code-editor": "^1.0.0",
"php": "^8.0.2"
},
"autoload": {
Expand Down
9 changes: 7 additions & 2 deletions src/templates/_components/fields/_settings.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
#}

{% import "_includes/forms" as forms %}
{% import "twigfield/twigfield" as twigfield %}
{% import "codeeditor/codeEditor" as codeEditor %}

{% set monacoOptions = {
} %}
{% set codeEditorOptions = {
wrapperClass:"monaco-editor-background-frame"
} %}
{{ twigfield.textareaField( {
label: "Twig code to parse"|t,
instructions: "Enter the twig code that you want to parse after the entry has been saved.\nIf the column type is set to Date (datetime), the parsed Twig should output a date formatted as `Y-m-d H:i:s`."|t,
Expand All @@ -23,7 +28,7 @@
value: field['fieldTwig'],
class: 'code',
rows: 10,
}, "Twigfield", "monaco-editor-background-frame") }}
}, "CodeField", monacoOptions, codeEditorOptions) }}

{% set columnType %}
{{ forms.select({
Expand Down

0 comments on commit 68a0abc

Please sign in to comment.