Section Editor Plugin: First Stable Release

Looks like a simple update from 5.1.2 to 5.2.0 did the trick. Thanks for the help.

1 Like

@Mohammad please look into this GitHub issue

Section Editor 1.0.0

Section Editor has got a new release! This release is an update to use Tiddlywiki 5.2.1 new Cascades feature (See Tiddlywiki Cascades).

Change Log

  • Dec 22nd, 2021
  • [NEW] updated to Tiddlywiki 5.2.1
  • [FIXED] foldstatus uses temporary tiddler to prevent save button get red
  • [FIXED] new Cascades is used to handle rendering body text of tiddlers with se-type field

Code and demo

This new release is called Yalda! Tonight is Yalda night!

5 Likes

Great, I’ve been longing for this!

1 Like

@Mohammad , thanks for this plugin, it is now much easier to do my academic notes/writings in tiddlywiki.

New function request: Can you drag and drop one section to reorder this sections? For example, if I have

! section 1
! section 2
! section 3
! section 4

Can I drag the heading section 3 and drop it before section 2? The resulting tiddler should be

! section 1
! section 3
! section 2
! section 4

It would be even better to able to drag a section heading in one tiddler and drop in another tiddler.

That’s a good feature and is in my todo list!
But the implementation takes time and needs substantial work! Right now, Section Editor does not touch the tiddler except for editing sections! One solution is having an outline view, reorder section and write back to the tiddler!
I welcome other solutions and possible PR on GitHub!

1 Like

Mohammad, Whilst your latest release is 1.0.0 the Kookma plugin library suggests “downgrade” with version 0.9.6 displayed.

Hi @TW_Tones
I forgot to update the library.
I will

1 Like

i can’t seem to use this as template? i created a tid with se-type and tagged it with view template. but i cant edit on the actual tiddlers (they also have se-type). same with if the tid is popped out to new window- no edit ability there either.

another thing, when used with the toc by @Sttot it lists the heading - but cant scroll to them.

a (kinda important) bug that if 2 section start with similar title (section 1 , section 2) it overrides the content of the other section :frowning:

I cannot reproduce this issue on Section Editor — create, edit, fold, manage sections. Section editor can handle a tiddler having headings with same title

I am afraid I do not follow you, but if you mean you want to use the section editor in a viewtemplate, it should be possible.

that’s what i mean and i tried. what i did was:

create a tiddler with the se-type and desired headings
then i tagged it with view-template tag

now in the view template i DO see the sections- but i can’t edit them with section edit buttons - like a regular tiddler tagged with se-type

I think this is not the way a viewtemplate works.
Look for $:/plugins/kookma/section/viewtemplates/sections and see how it works.

i re-downloaded the section tw demo - and its the same behaviour as in my wiki. this is what i did:

1- create new tidler
2- 2 headings called ! abc and ! abc
3- switch to view mode and edit 1 of them

result is that it edits both :frowning:

thx Mohammad for the reference. i took a look but its too complicated, ive no idea whats happening :frowning: i tired duplicating it, and adding sections header after the last </list> but it doesnt show up on the regular tiddlers.

to date i’ve been just tagging everything i want in my view templates with the view-template tag. it does work for most things thankfully…(not all the time though)

I will investigate and will inform you

Yes, using some properties to render a tiddler through a template is one way. Section editor use its own viewtemplate (using a field: se-type) so you have to hack it or create your own viewtemplate based on that.

If I understand you want to apply section editor to some tiddlers through tag and not field se-type. I would recommend to use the field if you like section editor works for you out of the box, if not then the $:/plugins/kookma/section/viewtemplates/sections can be hacked
for example change <$list filter="[all[current]has:field[se-type]]"> to <$list filter="[all[current]tag[se-type]]"> will work on all tiddler tagged with se-type

What is the real use case for this? A book with two identical chapters? or an article with two identical headings?

For simple solution now: add an extra space to one of ! abc e,g ! abc will work.

More information:
This is a special case. As I explained Section editor can handle two headings with same title, but it can not handle two sections with same content (e.g. headings and their contents are the same. = two exactly identical sections)
I will address this edge case in future release!

BRILLIANT hack! i was adding things to the other side - didn’t consider empty spaces before the title.

in my case what happened was i was trying to create a new section to “clean up” things id dumped under the old section - so i copied it (probably), edited much, but not everything. when i commited to save it though - the old section got over written. from then on i ensured to give diff titles to each section like header 1, header 2 to distinguish them. sometimes it worked and sometimes it overwrote.

it might not be purely section where the bug is though - i have so many plugins in the wiki - im almost sure its clashing with something else because i dont see that behavior in the demo file.

also - just info for other users, if two sections (header + content) are accidently made identical, even if you change title of one to something else - other will still copy it from then on. to fix it = have to edit title from the main editor window. then it sees each as seperate again.