You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (lastWindow) lastWindow.remove(); // #LiveProgrammingLoop
9
+
var comp =awaitlively.openComponentInWindow("lively-markdown")
10
+
11
+
var src =`# hello
12
+
This works:
13
+
14
+
<script>
15
+
import moment from "src/external/moment.js";
16
+
17
+
18
+
moment("1981-06-10").toString()
19
+
20
+
</script>
21
+
`
22
+
23
+
comp.setContent(src)
24
+
lastWindow =comp.parentElement
25
+
})()
26
+
```
27
+
28
+
## Turning Wiki-pages into Tools (#PaperIdea)
29
+
30
+
We used markdown pages to prototype tools and visualizations a lot. But to use it, one had to navigate to that specific page and interact with the tool there. A good and working example of the setup are these journal pages and their index page that allows to create new entries. But markdown pages are not easy to integrate into a workflow with other tools. E.g. using the git graph visualization tool directly from our sync tools is not possible.
31
+
32
+

33
+
34
+
With our new `openMarkdown` feature this can now be done.
This method opens a markdown page directly into it's own window without using the container/browser. The JavaScript world can interact with the markdown with in two ways:
42
+
43
+
1. Parameters can be passed (here the `url`) and be read by the scripts inside
44
+
2. The `openMarkdown` awaits the execution of all scripts and the resolving of all promised parameters. That way one can wait on active content in the markdown and use it further.
45
+
46
+
As an example, we added a button to the repository sync tool.
0 commit comments