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.
Ah sorry. The issue is with Uglify plugin.
Please check the new demo.
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)
Thank you! I will add this little kit to the next release!
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.
@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.
In order not to clutter this already long thread, I moved the comments about a TOC for the Section Editor to:
The section editor is beautiful but it does not save the state of an opened or closed section. In view mode I would like to have some sections open and some to be closed in the tiddler. When I save my wiki an reload it, every section is open again.
I think the problem with saving fold states forever and ever is that there can be a proliferation of orphaned state tiddlers. For instance, if you decide to change the name of your tiddler, and it has a 100 sections, you might leave behind a hundred tiddlers. Rather than deal with all that clean-up, it’s easier just to use temp tiddlers.
Here’s a macro that can save the state of your tiddlers. It’s very ugly. I’m sure someone can think of a nicer way of displaying your options. Just put
<<save-sec-state>>
at the top of your tiddler. It gives you two buttons:
Use the first button to save the state that you’re happy with. It saves the settings in a field in your current tiddler. Use the second button to restore the state.
A better version would also save your header-level setting, since these numbers only have meaning for a particular maximum level. But for a basic case this should work.
Be sure to make a backup – this is barely tested.
Save Section State Macro.json (904 Bytes)
Thanks. I’m going to import it in my test wiki first.