Open DmitrySharabin opened 10 months ago
That doesn't sound like a sustainable proposal @DmitrySharabin . Atto editor is going to be retired soon. Boost Union should not rely on it, IMHO.
Best, Luca
Hey @lucaboesch,
Thanks for the quick response. I might not have been precise in my words. I propose to add some bare minimum to the text fields, which are supposed to work with raw code. I don't suggest using Atto for this. It was an example illustrating that it's not something new in Moodle.
Regards, Dmitry
So, just formatting the text field content in monospace would already be enough? That wouldn't have any color highlighting but might look more into what you are desiring though.
So, just formatting the text field content in monospace would already be enough? That wouldn't have any color highlighting but might look more into what you are desiring though.
I donβt think that would be enough. The main issue with these fields is bad UX, not how they look. There are no clues that might help spot code bugs in the early stages. When we highlight different parts of CSS rules with different colors, we help people read and understand the code and be more proficient while working with it.
Something like Prism might help.
Ah, I see, that is reasonable. And fortunately enough, Prism is already (starting in version 4.3) delivered with Moodle core, see https://github.com/moodle/moodle/tree/master/filter/codehighlighter/amd/src
Yay! π That gives me hope. π
Customizing sites' styles, I noticed that in most cases, when I need to perform some minor changes, I edit SCSS directly in the Raw SCSS text field. I'm so used to the benefits of working with code in code editors that I started expecting something like this from Moodle. π Luckily, thanks to text editors built into Moodle, we can get all we need. For example, the HTML/code view of the built-in Atto editor provides excellent DX; it not only highlights the syntax but also traps the Tab key so that we can indent code with tabs right inside the editor.
It would be lovely to get something like Atto's HTML/code view instead of plain HTML text fields when working with code inside the Boost Union theme.
P.S. It looks like we will see the end of Atto in Moodle, but we still can benefit from its good parts. π