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

TextArea docs missing syntax highlighting #4094

Closed
TomJGooding opened this issue Feb 1, 2024 · 5 comments · Fixed by #4099
Closed

TextArea docs missing syntax highlighting #4094

TomJGooding opened this issue Feb 1, 2024 · 5 comments · Fixed by #4099
Labels
documentation Improvements or additions to documentation Task

Comments

@TomJGooding
Copy link
Contributor

I spotted that the updated TextArea docs following the release of v0.48.0 seem to be missing the syntax highlighting. I'm not sure why yet as I've only actually only skimmed the new docs so far.

image

image

Copy link

github-actions bot commented Feb 1, 2024

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

@darrenburns
Copy link
Member

Ah, I forgot to update the docs examples to use TextArea.code_editor(...) instead of TextArea(...) 😄

@TomJGooding
Copy link
Contributor Author

TomJGooding commented Feb 1, 2024

Ah, so setting the language only works with a TextArea.code_editor? Or only if a theme has been set? I confess I've only skimmed the docs so far but that might need emphasising a bit?

@darrenburns
Copy link
Member

TextArea.code_editor just returns a TextArea with different default values set. You can set all the same attributes on both of them. The issue is the default theme of the TextArea was changed to css, which doesn't contain syntax highlighting. Previously it was monokai, which does have syntax highlighting.

If you use TextArea.code_editor, the default theme remains monokai, so highlighting will still work. Similarly you can still do TextArea(TEXT, theme="monokai").

Perhaps the new default CSS theme should have some syntax highlighting too though.

Copy link

github-actions bot commented Feb 5, 2024

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation Task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants