Improved editor for Ace settings by Ruslan-Aleev · Pull Request #207 · modmore/ClientConfig · GitHub
Skip to content

Improved editor for Ace settings#207

Open
Ruslan-Aleev wants to merge 1 commit into
modmore:masterfrom
Ruslan-Aleev:ace-feature
Open

Improved editor for Ace settings#207
Ruslan-Aleev wants to merge 1 commit into
modmore:masterfrom
Ruslan-Aleev:ace-feature

Conversation

@Ruslan-Aleev

Copy link
Copy Markdown
Contributor

What does it do ?

Called MODx.ux.Ace.replaceComponent() which gives MODX tag and syntax highlighting.

The only oddity is that when saving, 2 values are given in value, because MODx.ux.Ace.replaceComponent() seems to create a new editor but not remove the old one. And I had to add $value = $value[1]; to fix it. Maybe @Mark-H can give a better fix.

Before:
cc_before

After:
cc_after

Related issue(s)/PR(s)

N/A

@sebastian-marinescu

sebastian-marinescu commented Sep 4, 2023

Copy link
Copy Markdown
Contributor

@Ruslan-Aleev

Copy link
Copy Markdown
Contributor Author

Yes, it would be convenient to set the mme-type either manually, or load it with a list from MODx.ux.Ace.mimeTypes.
If you have the time and opportunity - add a fix to this PR.

@sebastian-marinescu

Copy link
Copy Markdown
Contributor

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