Closed tobibeer closed 9 months ago
edit-binary.js seems to just be a place holder that shows a warning message. Am I missing something? I couldn't find any uses of it.
I am reading through entity.js and it seems that it should allow you to render an html escape sequence, however I am having trouble getting it to work.
This works as expected, rendering the cent sign
$tw.utils.entityDecode("¢")
However, when trying to use the actual widget I am unable to get it to pass the correct value into the entityDecode function. I've tried these variations:
<$entity>¢</$entity>
<$entity entity="¢" />
Both result in Cannot read property 'substr' of undefined
due to undefined being passed to the entityDecode function.
Not entirely sure, but the reason why these widgets are not documented yet is possibly because they have so far been solely used by the core to provide basic components to handle things like plain html within wikitext. So, while part of the api, they're perhaps not quite seen as general purpose widgets to do stuff with. On the other hand, for completeness sake, I think it makes sense to have them documented as to what they do and how they work.
@Jermolene, I also couldn't figure out how to make the entity widget work when entered into wikitext... and, it's perhaps worth investigation what produces the js error... so as to capture these things.
The "entity" widget accepts the "entity" parameter through the parse tree, not as a conventional attribute. It could be updated to look for an attribute and then fall-back to the parse tree parameter, as some other widgets do.
Not entirely sure, but the reason why these widgets are not documented yet is possibly because they have so far been solely used by the core to provide basic components to handle things like plain html within wikitext
That's roughly correct, the three widgets edit-binary.js, element.js, entity.js aren't really very useful outside the core rendering process.
Perhaps any basic documentation on tiddlywiki.com for these widgets could transclude a basic summary about he parsetree mechanism and maybe point to...
Did not find anything about edit-binary
@Jermolene -- Should we keep this one open?
Thank you @pmario
The "element" widget is an implementation detail and I think serves no useful purpose for end users.
The "edit-binary" widget is an implementation detail of the <$edit>
widget isn't very useful on its own, and so I think it is reasonable not to clutter up the docs with it.
These widgets are part of the core whereas there appears to be no documentation on TiddlyWiki.com or prerelease for them yet.