I am still writing my own widget.
It dos tha transclusion correctly, but not performs well with wiki syntax requiring block mode. like list notation.
So suppose the contents of “source” tiddler is
* one
* two
and consider the following code inside my widget class.
InsertWidget.prototype.render = function(parent, nextSibling) {
this.parentDomNode = parent;
this.computeAttributes();
this.execute();
const action = `<$action-sendmessage $message=tm-edit-tiddler $param="source"/>`;
const parseMode = { parseAsInline: true, configTrimWhiteSpace: true };
const edit = `<$button actions="${action}">edit source</$button>`;
this.output = `\\whitespace notrim\n<div class="hole" title="sample"><$transclude mode="block" output="html" $tiddler="source"/> ${edit}</div>`;
const parser = this.wiki.parseText("text/vnd.tiddlywiki", this.output, parseMode);
this.makeChildWidgets(parser.tree);
this.renderChildren(parent, nextSibling);
};
The whitespace pragma is needed to have a space before the edit button.
The problem is that the output does not translate the wiki list. It does OK for wiki text that apply in inline mode and for the button widget (including when you click on it).
Any idea?