Skip to content

Twigfield integration#12149

Closed
brandonkelly wants to merge 6 commits into
4.3from
feature/dev-1026-twigfield
Closed

Twigfield integration#12149
brandonkelly wants to merge 6 commits into
4.3from
feature/dev-1026-twigfield

Conversation

@brandonkelly
Copy link
Copy Markdown
Member

See #12119

khalwat and others added 2 commits October 13, 2022 14:49
@linear
Copy link
Copy Markdown

linear Bot commented Oct 18, 2022

DEV-1026 Twigfield

@brandonkelly brandonkelly changed the base branch from develop to 4.3 October 18, 2022 21:11
@brandonkelly
Copy link
Copy Markdown
Member Author

There are a couple blocking issues with Twigfield that need to get sorted out first:

  • Needs to be translated into each of the languages Craft supports
  • Shouldn’t break tabbing for single-line editors
  • Ideally it could support Alt + Tab and Alt + Shift + Tab in multi-line mode as well

@khalwat
Copy link
Copy Markdown
Contributor

khalwat commented Nov 1, 2022

Twigfield has been deprecated, and replaced by Code Editor, which is a general-purpose code editor that also does Twig & autocomplete.

I pushed the changes necessary to convert this PR over to use it here (it's mostly just renaming the namespaces, along with some minor API changes):

https://github.com/khalwat/cms/tree/feature/v4-twigfield-integration

Code Editor:

  • The JavaScript portion has been rewritten in TypeScript
  • The tab handler mentioned above has been addressed
  • In addition to Twig, it supports any language that the Monaco editor supports; examples: JavaScript, CSS

I've already PR'd it into SEOmatic, Sprig, Preparse, CP CSS, and CP JS.

The only remaining issue is translation, which I leave to you to handle.

@khalwat
Copy link
Copy Markdown
Contributor

khalwat commented Dec 14, 2022

The issues you cite have all been sorted out in craft-code-field: https://github.com/nystudio107/craft-code-editor

Do you plan to circle back and look at this again?

@brandonkelly
Copy link
Copy Markdown
Member Author

Yeah I will, but can’t get it into 4.4 at this point. Still on my radar though…

@riasvdv riasvdv deleted the feature/dev-1026-twigfield branch September 24, 2025 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants