giuspen / cherrytree

cherrytree
https://www.giuspen.net/cherrytree/
Other
3.29k stars 457 forks source link

Streamlining formatting of static code blocks (not CodeBoxes). #2528

Open gitvectors opened 2 weeks ago

gitvectors commented 2 weeks ago

Consider a typical tutorial such as here:

https://www.sitepoint.com/laravel-project-setup-beginners-guide/#directorystructurenavigatingalaravelproject

If we write similar guides in CherryTree it is a lengthy process to embed each snippet of syntax. White text on black background (or better reflecting the theme of CodeBoxes to be consistent).

We select the syntax then go to Format >Text Foreground Color then Text Background Color. We cannot clone theme when embedding multiple snippets.

Note: this is not in CodeBoxes but in the main node document.

It would be helpful if this was one operation.

Format > Code Syntax Theme.

And perhaps to remember last theme used. For multiple inserts of syntax dotted throughout the node document.

Follow up notes: I have radically changed my workflow. Instead of attempting to parse the XML document (the CT node) I have decided to simply export node as HTML as a staging operation. The exported HTML format is very basic but I can work on that content changing style and embedding scripts. The codeboxes can be styled. Then if I wish to document a node including embedded codeboxes I can export to PDF using Pandoc. Another thought is to take screenshots of the CodeBox syntax to embed in the exported HTML.

Issue resolved.