To know the logic behind, Section editor applies your change by search-and replace so when it sees to identical sections (header + content) it replace all of them with edited content.
Thanks Mohammad for this! As a long time Leo Editor user, seeing SE opens a lot of possibilities to using “organically” TW as an outliner.
My suggestions were in the same lines as in the message you’re answering now: a tree view for (sub)sections and the possibility to move them along the tree up/down and left/right (promoting/demoting). I don’t know if it could help in the work you have ahead, but maybe just having some arrows icons for such operations even without the whole tree preview, could be a start: left/right would subtract/add “!” characters to the subsection name, while up/down would imply more work to move them above/below the containing tiddler.
Of course, I don’t know implementation details and without them, I don’t know if my suggestion makes sense implementation wise. I was thinking about the minimal user experience for subsections rearrangement.
HTH,
@Offray
The purpose of Section-Editor was to break down a long tiddlers into parts for editing! and I think Section-Editor was successful for that. A more advanced version (part of that on GitHub under development branch) was created by @Sttot and later used and extended by @linonetwo. They are very good at JavaScript and so I assume their version could do what you proposed!
By the way, for outlining, I may suggest the TOC (table of content) by @EricShulman in his great Inside TiddlyWiki — A Guide for Users, Authors, Designers and Developers (tiddlytools.com).
This TOC is wonderful, Eric may have suggestion for re-ordering headings in an outline view
Hi @Mohammad,
a tiny idea for your section editor:
You could add a settings-checkbox to decide whether to trigger an autosave after editing a section.
Sometimes I make only tiny corrections to sections and forget to save…
Hi Jan (@JanJo )
Note that Section-Editor uses temporary tiddlers $:/temp/… for editing section. So on edit you actually create a hidden tiddler.
If your Tiddlywiki has autosave enabled, you can make sure they are saved automatically.
You can hack the section-editor to use $:/se-sate instead of $:/temp to keep the intermediate data.
Note that there is a different scenario for Tiddlywiki on Node.JS as $:/temp tiddlers are not saved!
Hi @Mohammad I have built a slideshow which is using your section-editor-plugin, perhaps you remember this is my second attempt. This time I combined the sectiont with a mod of the Roman Veselý’ s Krystal-Plugin.
I works quite smooth by for presentations and flashcards on a smartphone but I have some requests to make the plugins work together even better.
For the Plugin, it would be great
- if text before the first section in a Tiddler had a class that could be addressed by CSS to make it scroll-snap as an own element.
- if it was possible to transclude and prepend an element that to the se-article whithin the ```
se-tc-tiddler-body.
So please have a look, I hope my plugin is useful for you too .
Best wishes Jan
Hi @JanJo
I have not worked on the SE code for a while, I need to have a look, but please note the philosophy behind that first text part (I called it preface) was, sometimes users forget to start with a heading and have some extra text before their first heading,… In the first version of SE this caused some errors and I added a code to handle it! So, by design it is recommended to have not such part and start with a heading to be editable!
By the way, open the viewtemplate for single tiddler, I assume I have wrapped that first part in a div, so you can add your own class.
Hi Mohammad,
thanks for considering and looking at the code. Adding a class to the Preface would make things so much easier for me because creating a presentation would take almost no effort. The problem could be solved by adding a ! without title, but ergonomically and typographically, it is nicer to have this preface.
I guess the view template is before the tiddler-body - I would need a part within the se-tiddler-body because it is the body that scrolls.
The tiddler body itself is not displayed instead Cascades is used to display customized content!
I will have a look as soon as I find some time to work on it
Hi @JanJo
Would you please have a look at $:/plugins/kookma/section/templates/foreword
You can wrap it in a div like below
<div class="se-foreword"><!-- this is waht you want -->
<!-- display foreword without sectionizing -->
<$transclude tiddler=<<currentSection>> field=title mode="block"/>
</div>
and let me know how it works for you.
Hi @Mohammad,
thanks for the hint. I could simply wrap it into a <section “se-section”> and it already works like a charm.
I’ll keep in mind adding the x-tra class but for now that is great
Thanks!
Mohammad, I’m arriving late to the Section Editor party! I do think I’ll set this up with some minor projects, and see how it feels.
One counter-intuitive behavior that doesn’t seem to be mentioned in this thread:
After collapsing a section, its own subsections still display. Ideally, when I collapse the details for the first h1 heading, the h2 nested below would disappear, so that the next thing below would be the second h1-level heading (open or closed)
I’m guessing that more accurate outlining / nesting behavior, especially with the editing functions, would be difficult to set up…
One reason I continue to rely on telmiger’s details plugin is that the collapse/expansion of nested details work nicely… But I admit it’s been cumbersome at the authoring and editing phase, so I’d love to convert to your SE solution, if only it handled the nested-element display more intuitively.
-Springer
That is right. The main purpose of section editor as its name says is to be able to break a long tiddler to smaller sections and be able to edit in place. Also create a patch tiddler for smaller tiddlers. So, outlining is not the first purpose.
Each heading creates a section, it does not matter what level it is, so all of them behave the same. But there were discussions (here and GitHub) to add the outlining to section editor. There is a development branch and some people added some features like capability to create an editable section from any html tag, but due to lack of time and interest it is inactive now.
I don’t use details plugin as Shiraz has display on demand feature, but you may use both details plugin + section editor! Each details start with a heading! I think this should work for outlining!
Mohammad, I do understand that you’re using your own display-on-demand feature, and I would assume that your plugins are compatible with other ones, such as telmiger’s details plugin…
Still: Do you recognize the more robust nesting-hierarchy behavior (so that all of h1 level of outline would collapse at once, thus hiding any h2 nested under it), as a feature that could in theory be developed for the Section Editor, or is it not possible because of the nature of the macros you’re using?
-Springer
I think this is in wish list! I think it is possible! but takes time!
In the current status I kept it very simple, the core is like three four small wikitext tiddlers
@Springer if you are desperate for an outliner the alternative is streams of course Streams — on TiddlyWiki 5.2.2
Personally I also;
- change $:/config/sq/streams/new-node-title to
-
$:/streams/<<stream-root-title>>/<<now "[UTC]YYYY0MM0DD0hh0mm0ssXXX">>
to hide the subtiddlers which have ugly titles from recent and search
-
- Add to that the streams fusion, to merge a stream into a tiddler text field if desired
- And streams is well designed for hacking and customisation.
Tones,
Sorry I missed this reply.
I’ve watched streams from a bit of a distance, like a language that others can speak fluently. Perhaps if I were starting tiddly life from scratch, streams would be of interest as an editor (though my impression is it’s still not so strong on GUI for non-author visitors). I’m now so attached to working with meaningful tiddler titles (which then appear on my sidebar lists, which I use constantly) that a different approach is a personal non-starter.
My reservation about the section-editor (as it stands now) is just that it looks as if it allows fully nested hierarchical structure (with good visitor-oriented GUI available), but then doesn’t quite behave that way. It’s still an exciting project!
@Springer keep in mind Section editor is just that and not intended to be hierarchical.
On streams it is very close to a common UI that a few notes would help users navigate it.
- Once configured one can start with +, just type, hit enter to finish an item, tab and shift tab to indent/(undent?), click to edit.
I would recommend Streams as a basis for innovations on top of it as its open, configurable and extensible/hackable. You could also use streams fusion to move the stream into the root tiddler and then add new features on top of that.
@Mohammad Is it possible to expand and collapse all the sections together, may be by using another button ?