Hello,
I am using the TiddlyWiki as a reference book and I have to use the stand alone version.
My idea is to import (and may be also delete but this is optional) Tiddler only if requested by the user. The chapters of the reference book are not always interesting for all users and so it would be possible to reduce the size of the file.
Is that possible to have
an import function e.g. by pressing a link or a button
and
Hello, Stefan, I have two quick thoughts, though Iâm sure others have more expertise.
One idea is to have your various âheavyâ source materials in a separate TiddlyWiki (ideally an external core TiddlyWiki â or even multiple such files, if dividing the content makes sense). If that extarnal wiki is accessed by opening a tiddler containing an iframe, then none of that additional content will load until that particular iframe tiddler is opened.
Another is that if itâs really about the file size of your main tiddlywiki file (rather than load speed of total solution), then you could try a solution by @saqimtiaz for loading remote tiddlers. (I donât have quick notes about how to find it here, but I do have a proof-of-concept implementation here. In my version, the remote tiddlers load at startup. I havenât tried having remote tiddlers load later.)
It may be relevant to know how youâre serving up this solution. Youâve implied that node.js is not an option, but is this reference being delivered and accessed over internet? What exactly is the file-size concern?
I read some other discussions here and I think it is possible.
So I found this here (copied and adapted from other threads), but I am unable to give over the file name xxx.tid.
thanks for our answers.
Why I cannot use the node.js is, that finally (in a few weeks) the wiki will used on a Sharepoint (company) server as aspx file. Actually we are testing some sandbox files and the results are GREAT The acceptance by the users is outstanding
Of course it could be possible to spilt the files but this will extend the service expense. One of the ideas here is that we have one production wiki and some development wikis managed by different teams. If the content in one the development wikis is released the tiddler will be exported and stored in a folder. As the editor agreed with the team about the file name the content at the beginning of the process it is easy to manage the the file by replacing the file.
I found some similar discussions here with tm-perform-import but have no final solution found yet.
Trying to load external content from 0.0.0.0. Welcome 1.tid
If this message doesn't disappear, either the tiddler content type doesn't match the type of the external content, or you may be using a browser that doesn't support external content for wikis loaded as standalone files. See https://tiddlywiki.com/#ExternalText
Than I changed the xxx.tid to a html version (I do not bring the html code here it is to long) and I also changed the content-type field to âhtmlâ.
The good thing is, it will be shown correct. But the button is not working (also links to other tiddlers)
I am still looking to solve it via $:/Import as described above but still unable to handover the information to use xxx.tid.
the expence is mainly calculated by working time of the editor to manage the content.
We donât want to have moderated workshops to have the content availabe. The teams needs to be indepentent as much as possible.
tm-perform-import is a command that expects the content to be already loaded from the server to the client. It does not activate any âread from serverâ action.
Since you wrote, that an xxx.html file could be loaded into TW I do suspect there is a permission problem.
IMO this attempt tm-xxx-import will be âblockedâ by the same mechanism that prevents the _canonical_uri from loading a .tid file. I donât know for sure, but I think the sharepoint server just âblocks the xxx.tidâ GET command. I can not test atm, since I donât have a sharepoint account atm.
I suppose, you do not want to open a browser âload file dialogueâ. right?
If I select my xxx.tid and press the import button than I got (more or less) in the âplopâ Tiddler my xxx.tid imported.
Now my question is (sorry I am not a developer for web based content) is :
> What I have to add/remove/change in this code to import xxx.tid without having a dialog before pressing the âImportâ button?
Exported in what format? If it is .json, maybe you can serve them using a static server, and fetch them, then pass the json to $tw.wiki.addTiddler. This can be done in a html wiki. And this process can be written as a JS tiddlywiki plugin.
And this reminds me of TiddlyWeb service, that loads user note from a server.
Tiddlywiki, among other wiki solutions, is currently undergoing an evaluation to see if the requirements that are needed are met.
Only when TiddlyWiki proves viable will the company even consider investing in any way.
There are still major hurdles in terms of maintenance and service costs. In particular because the use of many TiddlyWikis is possible.
To answer your question:
If I have a button (or something similar) what is importing the external file â./team_1/xxx.tidâ once implemented, than I can change the âxxx.tidâ without changing the origin Wiki file.
Why? The Wiki is based in a folder with limited access rights only the editors can make changes. The folder team_1 (and other) can have access rights for different teams. Therfore no additional service is required by the editor.
And, secondally, the Wiki file keeps smallm due to the fact that the, espected huge files from the teams, will be imported only by request.
I have implemented TiddlyWiki for a client in SharePoint and would be happy to assist.
I suspect there are other ways to tackle the workflow you are seeking be it manual or partially automated, however I donât understand the business requirements enough to explore all the possibilities.
I am guessing, based on limited information, but my suspicion is you can leverage existing mechanisms, such as the Import mechanism or drag and drop in including to or from an iframe, but with custom interventions to make it easier for non tiddlywiki enthusiasts.
There are limitations to stop security breaches allowing files to be opened or imported without the use of an interactive dialogue.
My work around is to store the full path and filename and on click, copy this to the clipboard, then in the open (or save dialogue) ctrl-V to paste the full path and filename then open/save.
I think it will help if you understand that $Navigator didnât just provide a file selection dialog. After you select the file, $Navigator actually imports the selected file into an intermediate format in the tiddler â$:/Importâ (with field âPlugin-typeâ=âimportâ) which can be used for import preview. You can verify this by editing the tiddler â$:/Importâ after you have selected the file and BEFORE you press your âImportâ button.
The tm message âtm-perform-importâ didnât trigger the importing of the selected file, it triggers the conversion of those already imported intermediate tiddlers in â$:/Importâ into actual tiddlers.
So the dialog and file importing goes together in $Navigator. It is implemented that way in the underlying js/browser.
So far understood.
What I donât understand is why it is not possible to load a defined tiddler by pressing a button.
Why the user has to perform a dialog and selection process before?
Itâs because of user awareness. Browser want to make sure, that users are aware whatâs going on so they can decide what happens with their data. ⌠The behaviour is primarily controlled by internal browser privacy and security protection mechanisms.
SharePoint has a REST API, that can be used to load files without those dialogues. I think it should be possible to use a _canonical_uri configuration, that would allow us to load .tid files. ⌠But there is still a chance that access to .tid files is blocked on the server level. ⌠Reading and understanding the docs and some experiments will be needed.
At the moment TW uses an internal function that is activated if a _canonical_uri is detected. IMO this function will need to be adjusted to know how to access the SharePoint API.