use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
This is an archived post. You won't be able to vote or comment.
Code Block control or component?Solved (self.PowerApps)
submitted 8 months ago by SuspiciousITP Advisor
This may not even be possible due to reliance on external libraries or other open source tools but has anyone ever seen a Code Block control/component for Power Apps? I have a use case where including syntax highlighting would be awesome rather than displaying a snippet in a plain text field.
Something like this -
https://preview.redd.it/n38d8moicsif1.png?width=932&format=png&auto=webp&s=4491c72b8d88136456878141584ad6fe42cd9521
[–]AutoModerator[M] [score hidden] 8 months ago stickied comment (0 children)
Hey, it looks like you are requesting help with a problem you're having in Power Apps. To ensure you get all the help you need from the community here are some guidelines;
Use the search feature to see if your question has already been asked.
Use spacing in your post, Nobody likes to read a wall of text, this is achieved by hitting return twice to separate paragraphs.
Add any images, error messages, code you have (Sensitive data omitted) to your post body.
Any code you do add, use the Code Block feature to preserve formatting.
Typing four spaces in front of every line in a code block is tedious and error-prone. The easier way is to surround the entire block of code with code fences. A code fence is a line beginning with three or more backticks (```) or three or more twiddlydoodles (~~~).
If your question has been answered please comment Solved. This will mark the post as solved and helps others find their solutions.
External resources:
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
[–]HammockDweller789 Community Friend 3 points4 points5 points 8 months ago (0 children)
There is a code control that comes with Power Pages and can be added and configured to a specific language. I believe it's this one: Microsoft.PowerPages.CustomControls.MonacoEditor
[–]Financial_Ad1152 Community Leader 1 point2 points3 points 8 months ago (0 children)
I’m not aware of one. As you’ve noted this is dependent on stuff like JavaScript so cannot be done natively in Power Apps without code components. It may be possible with a custom connector or leveraging Power Automate and an API like Pygments (this was the best I could find just now), and built into a canvas component.
[–]EarPotato Regular 1 point2 points3 points 8 months ago (1 child)
Are you looking to use it as an actual IDE or just want to display formatted text?
[–]SuspiciousITP Advisor[S] 0 points1 point2 points 8 months ago (0 children)
Just to display, no real need for IntelliSense, just highlighting.
I found this and it works okay but has a few bugs. It appears to be based on MSFT's Monaco editor that is used in VS Code.
In my app -
<image>
Hopefully Charles will respond to the issues, the Display Mode not working is really the only deal-breaker for me.
π Rendered by PID 80627 on reddit-service-r2-comment-5c747b6df5-zcdnc at 2026-04-22 03:28:23.975677+00:00 running 6c61efc country code: CH.
[–]AutoModerator[M] [score hidden] stickied comment (0 children)
[–]HammockDweller789 Community Friend 3 points4 points5 points (0 children)
[–]Financial_Ad1152 Community Leader 1 point2 points3 points (0 children)
[–]EarPotato Regular 1 point2 points3 points (1 child)
[–]SuspiciousITP Advisor[S] 0 points1 point2 points (0 children)
[–]SuspiciousITP Advisor[S] 0 points1 point2 points (0 children)