User:Whiteknight/Visual Book Designer

Visual Book Designer Use the outlining tool below to create a new book. Click the book title to rename it. Click Subpages to add new pages to the book. Click Headings to add page headings. You must install User:Whiteknight/designer.js to interact with this element. Installation instructions located at User:Whiteknight/Book Designer Gadget.

Known Issues

 * All: Opening two or more edit windows may cause problems because div id's won't be unique and some function calls will fail.

Feedback
Do you have some feedback, feature requests, suggestions, or questions? Let me know at my talk page.

Updating Gadget

 * For Admins: To update this gadget to the most recent version add the following code to MediaWiki:Gadget-wkdesigner.js:

About This Gadget
This gadget is designed to be a high-level, user-friendly way to automate the process of creating a new book here on Wikibooks. This gadget, the Visual Book Designer, works like a regular outlining tool. For each point in the outline, you have the option to add subpoints (subpages or page headings), or to modify the point (rename, delete, etc). When the gadget page loads, you should see something similar to this:

This looks like a lot of options! Creating a book does require an author to make many decisions, although luckily a lot of decisions have default values that you don't need to change. The sections below will discuss these options and how they can be used to shape your new book. You should feel free to experiment with this tool, in addition to reading this documentation. However, you should be careful because some buttons can have consequences. Some parts of this tool will open an edit window where you are able to save changes to pages elsewhere in the wiki.

'''Warning: This tool allows you to make edits to other pages in the wiki without first viewing those pages. Do not save page changes if you are not sure you want to create a new page or possibly overwrite an existing page. Abusing this tool is no different from abusing the edit function on any other page, and will be taken very seriously.'''

Note on Terminology
Outlines are shaped like "trees" from computer science fields, or "graphs" from mathematics fields. Each page or heading in the outline is a point called a "node". A node has a single "parent", and multiple "children". For a page node, the children can be headings or subpages of that page.

The top node, the node that has children but no parent, is called the "root node". In terms of books, the root node is the main page of the book, the table of contents. Children nodes of the root node are the pages and headings that appear on the table of contents.

Naming your Book
Naming or renaming your book is very easy. In fact, renaming any page or heading is easy too: Click on the page title to open an edit box. Enter the new name and click. If you want to delete the page instead, click instead. You cannot delete the book itself, but you can click Clear to delete your entire outline and start over from scratch.

Templates Menu
The Templates menu gives the option to create and specify templates for categorization and navigation.

Provided with this gadget are a list of 5 pre-made navigation templates. These templates are very simple and plain, but they are effective and customizable. They provide a good starting point for your book, and from there you can get more creative once your book has been created. You don't need to use these premade templates in your book, but it's one less thing to worry about up front. This is a wiki, so things can always change later as your book evolves.

Select a template from the drop-down box and click. This will open an edit window where you can view and possibly modify the template text before you save it. Clicking, like usual, will save this text and create your new template. For more documentation about these templates and how they are used, see Whiteknight's Book Foundry page.

My Book
 * Simple Header:

&larr; Page 1 &mdash;  My Book  &mdash;Page 3 →
 * Header with forward/back links:

 My Book  Page 1 - Page 1 - Page 1 - Page 1 - Resources - Licensing - Discuss
 * Page List Header:

&larr; Page 1 &mdash;  My Book  &mdash; Page 3 → Page 1 - Page 1 - Page 1 - Page 1 - Resources - Licensing - Discuss
 * Page list header with forward/back links:

In addition to these header templates you can specify the book's reading level and select categories that the book is in, for organization.

File Menu
The file menu gives a number of options for loading in pre-made books in a number of formats, and saving your outline into a number of formats.
 * Outlines: If you are working on your outline actively and it is incomplete, but you need to save it for later, you can save the outline to a page in your user namespace. In the file menu on the line marked "Saved Outlines", you can Save your current outline or Load a previously saved outline. Saved outlines will come with a link you can click to open the editor and load the outline in again.
 * Saved outlines are not perfect, they do not reproduce most configured options and they are not guaranteed to reproduce your outline perfectly.


 * Collections: You can load an outline from a personal or public collection page, or you can create a new collection page from an existing outline. Click Save to create a saved collection page, and click Load to load an outline from an existing collection page. Collections can be personal (in your user namespace) or they can be public (at Collections).
 * Existing Books: You can load the TOC from an existing book into the gadget for manipulation. Once you have an outline you can use the wikitext options on each page, or you can click Create to active the book creation automator. The automator will create all the pages in your book automatically, using the structure and text in the outline.
 * Only administrators can use the Create feature. This is for testing purposes now, and may be opened up to a wider audience of editors later.


 * Print Versions:Print versions are deprecated now that we have collections. However, you can still create them if you want. Click Save to create a new print version for an existing book from the outline, and click View to see the wikitext without opening an editor.

Notice that this tool can be used for more then just creating new books. Using the Load TOC feature, existing books can be loaded into the gadget and then used to create collections and print versions for the book.

Options Menu
The options menu gives you control over a number of options about the book.

inherit page text by default
 * collapse nodes by default: When you create nodes, they start collapsed by default. This means you have to open them to see subpages and headings.
 * add a resources page by default: Automatically create a page named "Resources" in the book, even if it's not in the outline.
 * add a licensing page by default: Automatically create a page named "Licensing" in the book, even if it's not in the outline.
 * add an introduction page by default: Automatically create a page named "Introduction" in the book, even if it's not in the outline.
 * add Collections Preface to Collections by default: When saving a collection, add the page Collections Preface to it.
 * use page comments to create talk pages: NOT USED. I haven't implemented this behavior, so it doesnt do anything.
 * make edits in an external tab or window: When checked, all editors will open in an external tab or window. If unchecked, editors will be created inline in the gadget.

Clear Outline
Clears the outline so you can start fresh. If you have something that you want to keep in the gadget, make sure you save it first before you clear the outline. Once cleared, there is no way to undo or go back.

Page Menus
Pages are the fundamental part of any book. Each page in your outline has a number of options.

Creating Page Headings
Each page may contain headings to break up content into smaller blocks. To create a new heading on your page, click the [ + ] link next to the word "headings". This will create a new heading in the outline with a default name that you can change later. If you would like to create multiple headings at once, you can click the word headings to open an edit box. Enter the names of all the headings you want to add in the box, one per line, and click.

Creating Subpages
Creating subpages is the same as creating page headings. Click the [ + ] link to create a new subpage in the outline. Click Subpages to open an edit box where you ca enter the names of subpages, one per line, and then click.

Viewing Wikitext
To view the wikitext of a page, click the Wikitext link. This will display the wikitext for the current page for review.

Editing and Saving
If you like what the wikitext looks like, you can actually create the page using the Edit link. This will open an edit window preloaded with the text of the page. Review and possibly preview the text, and then click to save the page.

Text and Comments
Under each page and heading node there are two lines of text, "Click here to edit page text", and "Click here to edit comments". Clicking on either of these two lines will open an edit box where you can edit the text of the page directly, or where you can post comments.

The page text is the text that will actually appear on the page when it is edited and saved. If the "inherit?" checkbox is checked, the page will also include text from it's parent page too. This is a good way to add basic text to all pages, or all subpages of a given page at once. Keep in mind that this is not intended to used for creating the complete text of a page. This editor is simply not robust enough for large-scale text and collaborative editing. What it does do, however, is allow you to create some basic stub text to get the page started. Once the page is created on the wiki, you and other editors will be able to edit and expand the pages as normal.

Comments are notes which are visible in the outline, but which do not appear in the book when you create it. Comments are used to help you, the author, stay organized while outlining. At any time, you can click the text or the comments to edit them again.

Loading an Outline
You can load a previously-saved outline at any time, when you want to continue working on it. Click the load link to open a text box where you can enter the name of the page to load the outline from. Once you have entered the name, click to load the outline into the gadget automatically. if the load operation fails for any reason, nothing will be loaded and an error message will be displayed.

On an outline page, you will see a message similar to the following:

Clicking the "Edit This Outline In The Gadget" link will open the Visual Book Designer and automatically load that outline.

Version History

 * 3.73 Refactored handling of "Loading..." messages
 * 3.72 Some simple refactoring, and improved rendering of subpage text
 * 3.71 Add basic ability to load from collections pages
 * 3.70 All edit functions in core now take either a text string or a filter function. Refactored core to be consistent about handling nodes. Added external editor option. Refactored editor code.
 * 3.68 Add "[ + ]" links to create a new subpage or heading without an edit box.
 * 3.67 Refactor Options menu
 * 3.66 Added Options menu. Made Introduction, Resources, and Licensing pages optional
 * 3.65 Fixed detection of existing pages during rename. Added detection of existing pages during automate. Merged print version and file menus, improved file menu. Added deprecation note about print versions.
 * 3.60 Fixed automation, tested in FF
 * 3.53 Fixed wikitext formatting problems in IE7 and Opera
 * 3.52 Added error message if an older version of gadgetscore is used.
 * 3.51 Added timestamp to User:Whiteknight/SavedOutlineStart to tell when the outline was last edited.
 * 3.50 Broke gadget into three separate code files, one for each class.
 * 3.40 Added support for public and private collections, and a few small changes.
 * 3.39 added basic drag&drop (needs debugging)
 * 3.31 Improved some loading messages.
 * 3.30 Added collapse/expand buttons to pages and headings.
 * 3.25 Added ability to load an outline from an existing book.
 * 3.20 Updated "Print Version" menu, condensed "Save" and "Load" into a single "File" menu.
 * 3.11 Added basic "Print Version" capabilities from an outline.
 * 3.10 Added ability to "autoload" an existing outline using a query string
 * 3.01 Added an "HTML" mode, that saves the raw HTML of the outline for later display.
 * 3.00 First official release of this new gadget for public consumption. All important features have been added and tested.