A Block Editor: The next phase of Section Editor

Following to development of Section Editor, some comments were given on having a block editor!

With the contribution of @Sttot, a development branch on GitHub has been created and a new filter has been developed by @Sttot. At the first step this filter can distinguish some basic blocks in Tiddlywiki!

This filter takes the text of the tiddler and splits the text according to certain rules. if the rule is empty it means that all rules are used. The currently supported rules are as follows.

  • all: all rules.
  • h1, h2, h3, h4, h5, h6, h*: headers, where h* represents all levels of headers.
  • p: text paragraphs.
  • ul: Bullet lists.
  • ol: Number lists.
  • dl: Defines and descriptions.
  • list: ul + ol + dl.
  • tiddler: Transcludes.
  • table: Tables.
  • section: Segments wrapped by <section></section> tags.
  • latex: LaTeX blocks.
  • hr: Dividing Line.

Usage: Separate the rule names with + and place them inside [].

You can download the development branch (GitHub - kookma/TW-Section: create, edit and manage big and lengthy tiddlers through sectioning) and give a try.

Note: The development will takes time, but I assume we can have a new release in few months ahead! Finally we will have a block editor to be able to edit any chunk of information in Tiddlywiki!

Section Editor

Ref

4 Likes

Thanks @Mohammad I’ve been following the GH chat with interest.

Is there a hint how to use the block editor? Also where those rules go?

For anyone who’s curious, I compiled what I think is the plugin v095:

plugins_kookma_block_095.json (46.1 KB)

Thanks a million @Mark_S
Please see: Feature suggestion: use custom filter to split sections · Discussion #7 · kookma/TW-Section · GitHub

Threre is a newsectionsplit filter, you could use it like

[[SomeTiddler]get[text]sectionsplit[]]

It does not included in Section Editor UI. We are experimenting!

Hello Mohammad,
thanks a lot for the section editor.
I think it is an important opportunity to manage big tiddlers that way.
This helps keeping together what belongs together.

I could imagine a view-toolbar-button to create and remove the se-type field could be a nice addition to the plugin.

Perhaps such a button also could be used to set a value in that field that indicates whether in that tiddler the accordions are open or closed by default.

Thanks for your work and ideas and best wishes
Jan

3 Likes

Thank Jan! I bookmarked your comments!
I will see how to implement them while we keep the SE simple!

Hello Mohammad, Hi Fans of this plugin.
I made a fast button to toggle the section-mode
Section Button + Image + Test.json (1.8 KB)

Best wishes jan

2 Likes

Very nice and handy!

Hi Mohammad,
I am eager to install and use the sectionfilter.

Does it do what I think it does?

  • Divise tiddler in different parts along the headers?
  • Can I choose to show the headers or text after the header?
  • Can it extract the text of a specific section?
    All this would be great.

I would love to use it together with Devin`s great Reveal.js-Plugin where divising a Tiddler into sections would be extremely usefull to create presentations much faster and more intuitive.

Thanks for all your efforts!
Best wishes
Jan

This is on development branch! As packaged above by @Mark_S .

The section split can splits tiddler on some rules like headings! but the output needs to be processed accordingly! Note that, the filter does not extract anything! it splits the tiddler! @Sttot is the developer behind sectionsplit filter!

Hi Mohammad,
I already installed Marks .json…but I see no result:
It is here on the wiki for my Artlesson If you want to have a look.
(The controls are a little hidden, you see them if you hover the right border.)
Jan

Jan,
Please see Feature suggestion: use custom filter to split sections · Discussion #7 · kookma/TW-Section · GitHub
The filter only splits a tiddler text! So, it does not create sections nor you can see the buttons!

To give a try create a tiddler with some sections say SomeTiddler
then in another tiddler pass this filter [[SomeTiddler]get[text]sectionsplit[]] to a $list widget and see the result! Nothing more!

1 Like

Hallo Mohammad hallo Sttot.
Thanks, after correcting my Typo the filter works… I just need to know how to configure it better.
I did a little test here: Filtertest

At the Moment I get a section for each header and sections for the text in between using this[... sectionsplit[]]
and sections after the header, so that the next header is in a section with the text before it for [...sectionsplit[h1]]

I would like to be able to parse like this

  • Section
    ** H1
    ** Text

Jan,
The filter correctly splits the block! but as you said you need to write code to process each section! This is what section editor does! I expect you to have two parts, your code then shall process each part accordingly! You may dig into Section Editor to see how it works and get some idea to implement your own splitter!

Hi Mohammad, thanks for the hint, which of the templates does the splitting?

Jan,
You should start from $:/plugins/kookma/section/macros/main

1 Like

Hey Mohammad, this looks exciting.

Will there be a way to link to a block in tiddler A from tiddler B, or transclude blocks that refer to tiddler B in a viewtemplate of tiddler B? This would really make TiddlyWiki closer to the block references in Roam Research.

Hi Dave,
Yes, it is possible as it can extract a block of data. Sadly I cannot help more as it is in JS!
The main developer behind Block Editor is @Sttot. He is here and very active.
I am sure he can explain this much better than me.
I hope I can find time to back to this later, but feel free if you can customize it for your own plugins/tools.

@Sttot Any plans for the further development of the block editor mentioned here in the near future?