1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-07 20:44:23 +00:00
Commit Graph

1351 Commits

Author SHA1 Message Date
Jermolene
9ab0c84140 Support global macros via the importvariables widget
The new importvariables widget imports macro/variable definitions from
the specified tiddlers and makes them available to its children.

Allows us to split PageMacros up into separate tiddlers.

We still support loading macros from $:/core/ui/PageMacros to help
people upgrading.

Fixes #644 and #559
2014-06-12 18:01:33 +01:00
Jermolene
9547a1f01c First pass at external image support
A bunch of little changes that together enable external image support.
Try:

```
tiddlywiki editions/tw5.com --verbose --build externalimages
```

Then open `externalimages.html`, look for the images in the more/types
tab of the sidebar, open them and verify that they are set with an
external SRC attribute, not a data URI.
2014-06-12 08:36:30 +01:00
Jermolene
f131c37893 Update HTML parser to use an IFRAME
Gives us better sandboxing of unsafe HTML content
2014-06-11 23:04:58 +01:00
Jermolene
d2796d0c9c Introduce setfield command
This new command will let us do the manipulations needed to set up
external image tiddlers
2014-06-11 10:05:35 +01:00
Jermolene
a03a15e7de Allow the text widget to refresh if needed 2014-06-10 19:32:55 +01:00
Jermolene
305617b632 Introduce savetiddlers command
Allows us to save tiddlers in their raw format.
2014-06-09 14:45:41 +01:00
Jermolene
247eb04b11 Extraneous semi-colon 2014-05-31 19:18:01 +01:00
Jermolene
3182a2d599 Add first pass at select widget 2014-05-31 18:37:43 +01:00
Jermolene
f999b2e931 Add wiki.setText() method 2014-05-31 18:37:27 +01:00
Jermolene
a330cb543e Better defaults for radio widget
Now the “field” attribute defaults to “text”.
2014-05-31 18:35:41 +01:00
Jermolene
3f25db0abe More permalink tweaks
And more documentation this time!
2014-05-29 23:17:21 +01:00
Jermolene
412cde6f53 Move "storyviews" filter operator to correct folder 2014-05-28 17:17:47 +01:00
Jermolene
f7b8813a27 Change permalink behaviour
Now a link to a single tiddler like http://tiddlywiki.com/#HelloThere
will just open that single tiddler (the old behaviour was to also open
the default tiddlers)
2014-05-28 17:07:41 +01:00
Jermolene
da273be054 Workaround Firefox "no element found" bug
See https://bugzilla.mozilla.org/show_bug.cgi?id=884693

Fixes #468
2014-05-27 09:49:48 +01:00
Jermolene
9aaa000d3f Fixed default tiddler not appearing in zoomin view
See https://groups.google.com/d/topic/tiddlywiki/c-z7f-h1CAo/discussion
2014-05-26 22:56:28 +01:00
Jermolene
f44f2b33ed Fixed missing class on external pretty links 2014-05-26 17:57:35 +01:00
Jermolene
86d182fd51 Fix importing blank fields from TiddlyWiki files 2014-05-26 17:47:07 +01:00
Jermolene
31e1088aa7 Clean up startup logging
Now we do boot logging to an array. We harvest it in the —verbose
command. We still need to provide a way to access the log in the
browser too.
2014-05-15 18:50:14 +01:00
Jermolene
c9c1b0fbb4 Get rid of the tweakParseTreeNode() hack
It’s an embarrassing hangover from a refactoring of the parsing
mechanism last year.
2014-05-14 08:51:08 +01:00
Jermolene
9a26c4259a Fix problem with widget.getStateQualifier()
Fixed to take into account the recent change to read variables from the
parent widget: e60fc9f81f
2014-05-13 18:16:45 +01:00
Jermolene
ad43958571 Make permalink behaviour configurable
In the process introducing a new advanced settings tab

Fixes #600
2014-05-13 14:16:58 +01:00
Jermolene
75fee26b58 Fix problem with variables containing an empty string
See
https://github.com/Jermolene/TiddlyWiki5/commit/e60fc9f81f2c8f0d115543d8
d330a1d68f9b890a#commitcomment-6301921
2014-05-13 10:15:55 +01:00
Jermolene
e83759e86d Add "before" and "after" filter operators
Fixes #357 by adding new “before” and “after” filter operators.
2014-05-12 15:16:44 +01:00
Jermolene
e60fc9f81f Fixed problem with widgets variable access
Previously, widgets were reading variables from themselves or their
cascaded ancestors. That means that if a widget sets a variable and
then reads the same variable, it will get the same variable back. That
sounds reasonable, until you consider a widget that wants to modify a
variable - eg the tiddler macro. For example:

```
<$tiddler tiddler={{!!report}}>
<$transclude mode="block" />
</$tiddler>
```

Here we first evaluate the `{{!!report}}` reference, which involves
reading the currentTiddler variable, looking up the tiddler, and
retrieving it’s `report` field. The next the tiddler widget is
refreshed, it will use the newly set currentTiddler as the basis for
resolving the `{{!!reference}}` reference.

The fix is to get variables from ancestors, but continue to set them on
ourselves.
2014-05-08 11:51:02 +01:00
Jermolene
6ab68e0fca Remove erroneous global wiki references
$tw.wiki is used as a global reference in the outer initialisation
modules. It shouldn’t be used in widgets etc.
2014-05-07 14:49:14 +01:00
Jermolene
e548dd35af Restored drag and drop functionality within TEXTAREAs and INPUTs
As mentioned by @Skeeve in #592
2014-05-07 14:32:14 +01:00
Jermolene
e676156b24 Fixes for running TiddlyWiki on node-webkit
See Jermolene/TiddlyWiki5NodeWebkit
2014-05-07 09:59:21 +01:00
Jermolene
854b739a35 Implement explicit external links 2014-05-06 20:05:51 +01:00
Jermolene
abe0ce28b9 Fix typos in docs for image parser 2014-05-06 19:00:34 +01:00
Jermolene
7c8c5cf745 Fix problem with parsing main UI boot tiddlers
We were parsing the boot tiddlers, making them into a widget and then
refreshing the widget tree. The problem is that subsequent chances to
the boot tiddlers themselves wouldn’t be picked up as part of the
refresh.

Now we indirectly parse those UI boot tiddlers through a transclusion,
which does get refreshed in the desired way.
2014-05-06 10:14:22 +01:00
Jermolene
b84c663215 Add proper rendering of document title 2014-05-05 23:00:09 +01:00
Jermolene
4e101e240c Suppress history when changing the permalink URL 2014-05-05 21:51:54 +01:00
Jermolene
56251dc1f8 Fixes #598
Ensure we don’t generate permalinks with a target that is not in the
current story
2014-05-05 21:23:29 +01:00
Jermolene
f368175cb0 Remove debugging code 2014-05-05 20:58:47 +01:00
Jermolene
986a20b22b Fixes for permalinks not working on Firefox
Sigh. It’s frustrating that the few browser differences I’m running
into in 2014 are mostly horribly familiar from 2005
2014-05-05 19:21:57 +01:00
Jermolene
ffb6c8ab81 Add hex colours to tag manager
Fixes #597
2014-05-05 18:42:25 +01:00
Jermolene
b24ec8009d Missing dependency 2014-05-05 17:06:24 +01:00
Jermolene
9965c64b6f More refactoring of startup.js 2014-05-05 15:25:51 +01:00
Jermolene
2a50277219 Fix problem with syncer not being initialised on server 2014-05-05 14:44:32 +01:00
Jermolene
3cce12e13f More refactoring of startup.js 2014-05-05 14:41:46 +01:00
Jermolene
887e9d978b Fix problem with saving if URL contains # 2014-05-05 13:30:31 +01:00
Jermolene
a0022a1cd6 Refactoring more of startup.js into modules 2014-05-05 10:17:50 +01:00
Jermolene
519e1b4a44 Pull more of startup.js out into separate modules 2014-05-03 21:23:51 +01:00
Jermolene
b9dec37fb7 Split main rendering into it's own startup module 2014-05-03 19:50:05 +01:00
Jermolene
78ba57d55d Remove support for browser-startup modules
Instead support startup modules that stipulate which platform they
require.

Also include docs updates and fixes to fullscreen plugin
2014-05-03 17:49:20 +01:00
Jermolene
749582ede0 Split module loading into a separate startup task
Still a work in progress.
2014-05-03 17:10:55 +01:00
Jermolene
b96aade28a WIP: Add support for dependencies between startup modules
See StartupMechanism for details.
2014-05-03 16:32:18 +01:00
Jermolene
6ccf02ed96 Add support for onhashchange
Now we respond dynamically to changes in the location hash in the URL
bar. It means that you can do links in HTML as `<a
href=“#HelloThere”>go</a>` and in Markdown as `[example
link](#HelloThere).`

We still need to make startup.js more modular
2014-05-03 12:20:28 +01:00
Jermolene
b2c1331c11 Fix oversight in isDraftModified
If the original tiddler doesn’t exist then we should count the draft as
always having been modified
2014-05-03 12:12:07 +01:00
Jermolene
a5e9ef9b5f Adopt new URL scheme for permalinks
Instead of using `%00` as a separator we do the more conventional
`#!<target-title>:<story filter>`.
2014-05-03 11:32:55 +01:00