Copy link to clipboard
Copied
I am using TiddlyWiki with TiddlyMap for creating the drafts of my articles and I thought instead of writing in InCopy I could create my document in physical size directly in InDesign, from a draft in an InDesign panel created in TiddlyWiki / TiddlyMap.
Is there any way to open a website or run at least TiddlyWiki (requires JS) in a tab in InDesign?
Copy link to clipboard
Copied
TiddlyWiki can be run from NodeJS, I wonder if it could be used integrated in InDesign.
Copy link to clipboard
Copied
InDesign’s JavaScript (ExtendScript) is specific to Adobe’s applications. The InDesign API is here:
https://www.indesignjs.de/extendscriptAPI/indesign-latest/#about.html
Copy link to clipboard
Copied
Did you look at CEP extensions? They can run Nodejs packages as well
https://github.com/Adobe-CEP/Getting-Started-guides
-Manan
Copy link to clipboard
Copied
Thanks.
Copy link to clipboard
Copied
Since CEP is available many years ago, do you know by any chance if there is already one CEP extension out there, available, that can load a website in a panel and use NodeJS from a folder? Couldn't find any yet.
Copy link to clipboard
Copied
Couldn't find a tutorial for creating a browser/nodeJS extension panel either.
If anyone knows about one please let me know.
Copy link to clipboard
Copied
For examples refer the following, I see nodejs in the description of some extensions so you can look at those
https://github.com/Adobe-CEP/Samples
See the documentation here. Search for nodejs inside it, it describes much about its use within CEP context.
-Manan
Copy link to clipboard
Copied
Thanks.
Since then I found a concrete tutorial:
How to Build a Node.js Server in a Panel | by Steve Kwak | Adobe Tech Blog
Copy link to clipboard
Copied
I created a viewable sample in the main branch, this is how it looks (this is only with "download" saving because it's not off of NodeJS), this is what should be in the draft extension panel in InDesign.
Copy link to clipboard
Copied
Do people help with a little coding also on these forums?
I created my extension following this article.
I unpacked the Node.js binaries in the "server" folder.
My index.html in the "client" folder is my TiddlyWiki file, that I want to use as a drafting script in InDesign, it's wiki software, basically a single HTML file containing all the necesssary JS to run.
It can run without Node.js, but saving without NodeJS is implemented as downloading due to some security features (because TiddlyWiki can be used also as a website), so it needs to run off of Node.js for automatic saving, and it's more modular and more hackable when used from Node.js.
TiddlyWiki can run from Node.js in a portable way, without actually installing Node.js, according to this article.
I did not follow the instructions in the article regarding creating the files in the server folder because the author has a different purpose with that server, so I just unpacked Node.js into the server folder, that should be sufficient to run TiddlyWiki, according to the article above.
But I am not confident about my extension, what could be possibly wrong?
I did not test it yet because I know it's not properly configured.
Could anyone help?
Thanks in advance.
Copy link to clipboard
Copied
InDesign could open a website in a tab already back in 2010, here is an extension from that time (cannot download it, it's just adware left on the link):
In fact it's not a must to incorporate Node.js and the Chrome engine into an extension.
It's sufficient to make a tab that would launch the default system browser.
I know that JS has a "defaultbrowser" something, option.
Because TiddlyWiki would run for most people from the cloud like from OneDrive anyway, from the unpacked Node.js binaries, without install, which is convenient, from the localhost address.
That only needs to get the deafult browser launched in an InDesign tab or extansion, nothing more.
Anyone who knows how to launch the local browser window in an InDesign tab?
The extension linked above was done with flash, so I am sure it's possible with HTML 5, I just don't know how.
Many self publishers don't need to work in a team, so using InCopy is an overkill, and anyways that many window switching would drive me crazy, I think.
Anyways InCopy is nothing like TiddlyWiki, especially with TiddlyMap and FontAwesome installed.
I am not sure that launching the local browser in an indesign tab (preferably resizable tab) requires a CEP extension, or does it?
Copy link to clipboard
Copied
I am not sure that launching the local browser in an indesign tab (preferably resizable tab) requires a CEP extension, or does it?
I think so, the only object in ExtendScript API that lets you connect to a TCP/IP server is Socket:
https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Socket.html
But even if you can get the data, you still have to construct the panel or dialog, which probably isn’t going to happen with ExtendScript.
Copy link to clipboard
Copied
What you are saying is implementing a browser in InDesign (using their Chrome engine clone, right?)
But what I mean is embedding the local browser window only, that doesn't require any server or TCP/IP implementations, becasue the default browser would run there, as an iframe.
Copy link to clipboard
Copied
What I mean is allowing in an InDesign tab or extension to run any scalable installed desktop app, in this case the default browser. Actually grouping 2 deskop windows into 1 would also be sufficient, especially on higher resolutions than HD.
I can't do that on Windows so far, but maybe you can do it on Mac.
If you can do it, then you can run TiddlyWiki off of the Node.js unpacked binaries (after installing Tiddlywiki (not Node.js) into a One Drive cloud folder, where the binaries are unpacked.
Copy link to clipboard
Copied
Just to avoid constant window switching or looking from one monitor to the other.
Copy link to clipboard
Copied
TiddlyWiki is 100% scalable / responsive so it would adapt to the window.
Copy link to clipboard
Copied
It only requires localhost http://127.0.0.1:8080, or it will select 8081, 8082, etc if 8080 port is already taken (even if it's already taken by an other wiki).
Copy link to clipboard
Copied
But Adobe I am sure will allow to open browser windows in a tab (just like file explorers allow to open web pages at the path (not Bridge though), because it would be very useful because it would open access to lots of web apps, most importantly to Google, within InDesign.
Copy link to clipboard
Copied
What you are saying is implementing a browser in InDesign (using their Chrome engine clone, right?)
But what I mean is embedding the local browser window only, that doesn't require any server or TCP/IP implementations, becasue the default browser would run there, as an iframe.
I mean there are no methods in the ExtendScript API to do that via JavaScript. No idea if you can do it via a CEP extension ask in the coding or exchange forum:
Copy link to clipboard
Copied
But a command need to be executed to start TiddlyWiki at every system startup or later, and it leaves a leftover terminal window open (didn't find out yet how to start it without a terminal window) but if you run it from a Linux Subsystem terminal with "nohup", then you can close the terminal afterwards because the process will run:
cd /mnt/c/Users/username/OneDrive/nodejs_binaries_folder_where_tiddlywiki_is _installed && nohup tiddlywiki mynewwiki (your wiki name) --listen
but on Mac I don't know.
Copy link to clipboard
Copied
And you can always save it as HTML, then run it as a website from GitHub Pages or from a server.