# Name: soo_multidoc v2.0.3 # Type: Admin/Client side plugin # Create structured multi-page documents # Author: Jeff Soo # URL: http://ipsedixit.net/txp/ # Recommended load order: 5 # ..................................................................... # This is a plugin for Textpattern - http://textpattern.com/ # To install: textpattern > admin > plugins # Paste the following text into the 'Install plugin' box: # ..................................................................... YToxMTp7czo0OiJuYW1lIjtzOjEyOiJzb29fbXVsdGlkb2MiO3M6NjoiYXV0aG9yIjtzOjg6 IkplZmYgU29vIjtzOjEwOiJhdXRob3JfdXJpIjtzOjI1OiJodHRwOi8vaXBzZWRpeGl0Lm5l dC90eHAvIjtzOjc6InZlcnNpb24iO3M6NToiMi4wLjMiO3M6MTE6ImRlc2NyaXB0aW9uIjtz OjM4OiJDcmVhdGUgc3RydWN0dXJlZCBtdWx0aS1wYWdlIGRvY3VtZW50cyI7czo0OiJoZWxw IjtzOjEzNjY3OiI8aDE+c29vX211bHRpZG9jPC9oMT4KCjxwPlRoaXMgaXMgYSBwbHVnaW4g Zm9yIDxhIGhyZWY9Imh0dHA6Ly90ZXh0cGF0dGVybi5jb20vIj5UZXh0cGF0dGVybjwvYT4u PC9wPgoKPHA+PHN0cm9uZz5NdWx0aWRvYzwvc3Ryb25nPiBpcyBhIHN5c3RlbSBmb3IgY3Jl YXRpbmcgYW5kIG1hbmFnaW5nIHN0cnVjdHVyZWQsIG11bHRpcGxlLXBhZ2UgZG9jdW1lbnRz IGluIHRoZSA8YSBocmVmPSJodHRwOi8vdGV4dHBhdHRlcm4uY29tLyI+VGV4dHBhdHRlcm4g Y29udGVudCBtYW5hZ2VtZW50IHN5c3RlbTwvYT4uPC9wPgoKPHA+VGhpcyBpcyBqdXN0IGEg YmFyZS1ib25lcyB0YWcgcmVmZXJlbmNlLiBBbGwgb2YgdGhlc2UgdGFncyByZXF1aXJlIHRo YXQgeW91IGhhdmUgc2V0IHVwIHRoZSA8c3Ryb25nPk11bHRpZG9jPC9zdHJvbmc+IHN5c3Rl bSBvbiB5b3VyIFRleHRwYXR0ZXJ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