Create a document by slicing an existing tiddler


Help

HelloThere

This edition of TiddlyWiki contains tools to help slice up long texts into individual tiddlers.

This plugin is under active development, and is subject to change in the future. It is currently only intended for advanced users. The tools are in the early stages of development, and likely to need some customisation to do what you need.

Usage

The source document must first be marked up as an ordinary wikitext tiddler. Currently only the following formatting is recognised:

  • Headings
  • Ordered and unordered lists
  • Paragraphs

To try it out:

  1. Click the text slicer icon on the Sample Text tiddler below
  2. View the tiddler Sliced up Sample Text
    • It should match the content of Sample Text
    • The table of contents at the top allows the structure to be explored
  3. Click the Show toolbar checkbox to display a simple toolbar for each tiddler
  4. Use the text box and the rename button to rename tiddlers without breaking the tagging links

Plugin Instructions

Introduction

This plugin contains tools to help work with documents that are structured as a hierarchical outline of tiddlers. The structural relationships within the document are expressed through the list and tags fields: for example, headings have a list specifying the chunks of content to be shown under the heading.

The major components within the text slicer plugin include:

  • the slicer, a tool that slices up an existing monolithic document according to the headings, lists and paragraphs. It is available as a toolbar button for the browser, or as a command for use under Node.js
  • document preview column, a new sidebar on the left that shows the full text of any documents in the wiki and allows individual tiddlers to be opened with a click
  • templates for previewing and exporting the individual documents as HTML files

Minor components include:

  • a new list-children filter that returns all the descendents listed in the list field of the selected tiddlers
  • a new canned filter for advanced search that lists orphans tiddlers that are not part of any document

The tool can slice any tiddler that can be rendered as HTML, including both WikiText and HTML itself.

Documents created with Microsoft Word will need to be first converted to HTML. The library mammoth.js is recommended for this purpose.

Browser

In the browser, you can slice a monolithic document tiddler using the slicer toolbar button.

Node.js

The --slice command allows a tiddler to be sliced under Node.js:

tiddlywiki mywiki --slice SourceDocument --build index

Sample Text