Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add syntax highlighting to template textareas #47

Open
a-kempka opened this issue Feb 19, 2024 · 0 comments
Open

Add syntax highlighting to template textareas #47

a-kempka opened this issue Feb 19, 2024 · 0 comments

Comments

@a-kempka
Copy link

a-kempka commented Feb 19, 2024

As Generico parses the template content, CSS and JavaScript directly the template-admins must be very careful when editing templates. E.g. inserting one blank line in the template body is not visible in the editor, but can lead to confusing results.

As of now the configuration of the templates takes place in plain <textarea>s which can be error prone.
I'd love to have syntax highlighting (and line numbering) applied to the , maybe with enlighterJS or any other engine.

As each of the textareas is mostly used for a specific engine, the textareas could even be configured with the appropriate language:

  • HTML for the body of the template
  • JavaScript for the custom JS
  • CSS for the custom CSS
  • PHP for dataset

The other input fields of a template could use a fixed width font (<pre>) as a default.
Even a fixed with font and a different background color of the text as opposed to the textarea could help to distinguish erroneous line breaks and spaces.

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

No branches or pull requests

1 participant