Section Editor Plugin: First Stable Release

Thank you Eric for this explanation !

Section editor has got a new update. This is a maintenance release.

Release 1.1.1

Demo: Section Editor — create, edit, fold, manage sections
Code: GitHub - kookma/TW-Section: create, edit and manage big and lengthy tiddlers through sectioning

3 Likes

@Mohammad
Just an Idea that came to my mind today - Is it possible to set the number of levels of headings to be used in each tiddler separately by assigning the that number as fieldvalue to the fieldname se-type. By this way we can avoid setting the number of levels globally. Is it possible to do ?

1 Like

I think it is possible! But not sure as I have not worked on Section Editor for a while.
When you use macro for variable it is simpler to overwrite it,

1 Like

This is the great idea!

Is it possible to make a section editable with trottle Refresh? On weak computers the difference is quite noticeable: on my 12 year old laptop the time taken is measured using Advanced Performance plugin 1.1.0 - Expanded performance instrumentation equals ~300-400 for one of the heavy filters. On the same filter for a person with modern PCs, it is ~50.

Yes, it is possible. @saqimtiaz has discussed this before, and I have this in my todo list.
I will update as soon as I can.

See update 1.1.2.

Now all sections in edit mode have throttle.refresh field.

Thanks, just saw it. There is some mistake. This is what it looks like in chrome and firefox.

Ah sorry. The issue is with Uglify plugin.
Please check the new demo.

1 Like

This is a little kit I use to change the relative size of the preview window. This is useful for keeping the text window and preview window about the same size. I suppose it would be worth working out how to use it with regular previews, not just sections.

sections-preview-sizing.json (915 Bytes)

2 Likes

Thank you! I will add this little kit to the next release!

11 posts were split to a new topic: Table of Contents for Section Editor Plugin

Ya. It’s working. I might have misunderstood it’s working.

@Mark_S have you tried using the block editor - A Block Editor: The next phase of Section Editor - #3 by Mark_S

How is it different from section editor. I couldn’t find any difference.

Well, I must have used it 2021. But that’s a hundred years ago, in Mark years.

I think the idea is that you can split by almost every kind of mark-up – not just headers.

I’m hoping to get a dashboard for the TOC that’s more like the tags TOC, but it’s complicated.

1 Like

@Mark_S I have created a block editor test wiki here - https://block-editor-test.tiddlyhost.com/

How to do the splitting based on lists . Any idea ?

So, everything in there depends on a new filter operator sectionsplit. The versions of sectionsplit posted on the github discussion thread are simple enough to understand (sort of, maybe), but only include h1-h6, hr, and blank as options.

The sectionsplit operator included in Mohammad’s code (and the plugin I “helpfully” but foolishly compiled) is based on a new idea that tried to leverage the core parser. It’s much more complicated (to me). It doesn’t seem to work correctly – but the core has changed since December 2021, so it might be that it is out of sync with the core. To make it work, you might have to find whatever version of TW would have been used then.

And then, apparently, you have to overwrite a line of code in $:/plugins/kookma/section/macros/sectionizer to use the new splitter with sections.

So in other words, it’s not really ready for prime time, and it seems there hasn’t been interest since 2021.

which line to modify in that code?
I am interested in seeing how it works
It was an interesting concept.
Hope @Sttot have some time to work on it in the future.

In $:/plugins/kookma/section/macros/sectionizer , you need to replace the list widget for variable currentSection with

<$list counter=counter variable=currentSection
       filter="[<sourceText>sectionsplit[h1+h2+h3+hr]!is[blank]regexp<nonWhitespace>]">

There may be other places where the splitter needs to be inserted, but that’s as far as I got.

2 Likes

In order not to clutter this already long thread, I moved the comments about a TOC for the Section Editor to: