I’m trying to build a custom mode similar to the .todo mode. In fact, I started from FoldingText’s own todomode.js file. I copied the file into a new plugin directory, renamed it to main.js, moved over the .less file, and added a package.json file. Everything seems to work, except I cannot get my checkboxes to display.
I’ve traced through the code and see everything working as expected. The widget elements are created correctly and nodeRenderer.renderInlineWidget() is called as expected. But they never show up.
I’ve tried it with the same CSS class names as .todo, and with new ones created for the plugin (copied from the todo mode less file). I’ve also tried it with an empty style.less file, using the original todo mode class names.
In order to eliminate my code as a source of bugs, I tried creating a script where I took todomode.js verbatim, then changed only strings: “todo” to “todo2” and “done” to “done2”. Tested it on a .todo2 block and formatting fails. Drop the 2 and formatting succeeds.
Is there something going on inside FoldingText that makes the .todo mode work, that I don’t have access to?