Wiki source code of Page Editing

Version 103.5 by Sorin Burjan on 2012/01/13

Hide last authors
Sorin Burjan 70.3 1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
Guillaume Lerouge 33.1 4
Sorin Burjan 45.2 5 In XWiki all pages are editable (provided you are logged in and/or have the edit rights). To edit a page, all you have to do is to click the "Edit" button which is usually located at the top left of the page you're viewing (please note however that the location of the "Edit" button varies depending on the skin your wiki is using).
Vincent Massol 15.1 6
Vincent Massol 93.3 7 For instance if you're using the [[Toucan skin>>extensions:Extension.Toucan Skin]] you should see what is on the image below:
Silvia Macovei 40.1 8
Guillaume Lerouge 1.73 9
Raluca Moisa 93.4 10 [[image:EditSimpleMode.png||style="border: 1px solid black;"]]
Sorin Burjan 45.2 11
Vincent Massol 93.3 12 If you're using the [[Colibri skin>>extensions:Extension.Toucan Skin]] with the new Action Menus introduced in [[XWiki 2.5 Milestone 1>>xwiki:ReleaseNotes.ReleaseNotesXWikiEnterprise25M1]] you should see the following:
Silvia Macovei 40.1 13
Raluca Moisa 93.4 14 [[image:EditSimpleModeColibri.png||style="border: 1px solid black;"]]
Silvia Macovei 40.1 15
Sorin Burjan 45.1 16 = Simple and Advanced editing modes =
Guillaume Lerouge 1.73 17
Sorin Burjan 45.2 18 Since XWiki is an [[application wiki>>Main.SecondGenerationWiki]], not all users will need to use the same features. This is why XWiki comes with a Simple and an Advanced editing mode. Users can easily choose which editing mode they prefer on their profile (available at the top right of the page when you are logged in). This way, standard users do not have to choose between editing modes they may not be familiar with. By default new users are given the Simple editing mode but they can switch to the Advanced mode as described below.
Guillaume Lerouge 1.73 19
Silvia Macovei 43.3 20 == Simple Mode ==
Guillaume Lerouge 1.73 21
Sorin Burjan 45.1 22 After clicking on the "Edit" button in Simple mode, XWiki will automatically edit the page in the Basic mode (WYSIWYG or Wiki) for standard pages and in Form mode for pages which include Forms (i.e. pages using the ###includeForm()## macro). The two editing modes available in Simple mode are:
Guillaume Lerouge 1.73 23
Sorin Burjan 45.1 24 * [[Wiki Editing Mode>>Features.PageEditing#HWikieditingmode]]
25 * [[WYSIWYG Editing Mode>>Features.PageEditing#HWYSIWYGeditingmode]]
Guillaume Lerouge 1.73 26
Silvia Macovei 43.3 27 == Advanced Mode ==
Guillaume Lerouge 1.73 28
Sorin Burjan 45.2 29 Experienced XWiki users will want to use all the editing choices (particularly those who want to use XWiki programming features). They can choose to switch to advanced mode on their user profile page (see image below). Following this, clicking on the "Edit" button on any page will display the full editing menu, letting the user choose which mode he wants to use ("Wiki", "Inline form", "Objects"...). Under the "Show" tab, the "Wiki code" option is displayed too.
Guillaume Lerouge 1.73 30
Raluca Moisa 93.4 31 [[image:AdvancedEditMode.png||style="border: 1px solid black;"]]
Silvia Macovei 35.4 32 Once you have switched to advanced mode, the "Edit" menu will look like this on mouse over:
Guillaume Lerouge 1.73 33
Raluca Moisa 93.4 34 [[image:EditAdvancedMode.png||style="border: 1px solid black;"]]
Sorin Burjan 93.1 35
Sorin Burjan 45.1 36 * [[Form Editing Mode>>Features.PageEditing#HFormeditingmode28akainlinemode29]]
37 * [[Object Editing Mode>>Features.PageEditing#HObjectseditingmode]]
38 * [[Class Editing Mode>>Features.PageEditing#HClasseseditingmode]]
39 * [[Access Rights Editing Mode>>Features.PageEditing#HPageAccessRightseditingmode]]
Guillaume Lerouge 1.73 40
Silvia Macovei 43.3 41 = Common edit actions =
Sergiu Dumitriu 16.1 42
Silvia Macovei 43.4 43 All edit modes have some or all of the elements in the following image :
Sergiu Dumitriu 16.1 44
Raluca Moisa 93.4 45 [[image:EditActions.png||style="border: 1px solid black;"]]
Sergiu Dumitriu 16.1 46
Vincent Massol 42.1 47 The **minor edit** checkbox is meant to mark the fact that superficial changes were made to the document. Such changes may include, but are not restricted to: spelling error corrections, text rearrangements, formatting. It is the editor's responsibility to distinguish between major and minor changes.
Sergiu Dumitriu 16.1 48
Silvia Macovei 27.4 49 Reminder: A wiki document's version is composed of two numbers. Saving a major change will increase the first component and reset the second to "1", while a minor edit will just increase the second component.
Sergiu Dumitriu 16.1 50
51 By default, minor edits do not appear in the "What's New" page and in the document history. The option "Show minor edits" will list all the versions, including minor ones.
52
Silvia Macovei 35.4 53 The **comment** field allows entering a short description of the changes made to the document in the version that is being saved. It is displayed in the history page and it is meant to increase comprehensibility of the content's evolution.
Sergiu Dumitriu 16.1 54
Guillaume Lerouge 31.1 55 The **Cancel** button causes the changes to be discarded and forwards to the document view mode.
Sergiu Dumitriu 16.1 56
Guillaume Lerouge 31.1 57 The **Preview** button shows the document as it would look with the current changes saved, but does not actually change the document. From the preview mode, the user will be able to cancel the changes, return to edit mode or save the changes. This button is not available in all edit modes.
Sergiu Dumitriu 16.1 58
Guillaume Lerouge 31.1 59 The **Save & Continue** button submits the current changes and returns to the current edit mode.
Sergiu Dumitriu 16.1 60
Guillaume Lerouge 31.1 61 The **Save & View** button submits the current changes and returns to the document view mode.
Sergiu Dumitriu 16.1 62
Silvia Macovei 43.3 63 = Wiki editing mode =
Guillaume Lerouge 1.73 64
Vincent Massol 42.1 65 This is a mode you should be familiar with if you're already a wiki user. In this mode you can enter text using a simple [[Wiki Syntax>>Main.XWikiSyntax]]. Note that the syntax documentation help is displayed in a menu on the right when you edit a page in this mode.
Guillaume Lerouge 1.73 66
Silvia Macovei 70.2 67 This is how the wiki edit mode looks like with the Colibri skin:
Guillaume Lerouge 1.73 68
Raluca Moisa 93.4 69 [[image:WikiEditing.png||style="border: 1px solid black;"]]
Guillaume Lerouge 1.73 70
Silvia Macovei 43.3 71 == Choosing a Syntax ==
Vincent Massol 18.1 72
Sorin Burjan 90.1 73 Starting with XWiki Enterprise 1.7 you now have the option to choose what syntax you want to use for writing the content of the page (see the [[XWiki Syntax Guide>>platform:Main.XWikiSyntax]] for more details). To choose one of the [[configured syntaxes>>platform:AdminGuide.Configuration#HConfiguringWikiSyntaxes]] go in wiki edit mode and in the Information Panel select the syntax to use. For example using the Colibri Skin:
Vincent Massol 18.1 74
Raluca Moisa 93.4 75 [[image:Syntax2.png||style="border: 1px solid black;"]]
Vincent Massol 18.1 76
Sorin Burjan 70.3 77 {{velocity}}
78 {{html wiki="true"}}
Vincent Massol 35.2 79 #info("If you choose the XWiki Syntax 2.0 and switch to the WYSIWYG editor you'll notice that you'll be using the [[new WYSIWYG editor>>WysiwygEditor]].")
Sorin Burjan 70.3 80 {{/html}}
81 {{/velocity}}
Vincent Massol 19.3 82
Silvia Macovei 43.3 83 = WYSIWYG editing mode =
Guillaume Lerouge 1.73 84
Vincent Massol 42.1 85 This mode is ideal for first time users or people who do not want to use the Wiki Syntax. It's a mode similar to the one used by your favorite word processor in which you see how what you type is rendered. There's a toolbar available to add special effects to your text, add images, insert links, add macros, etc.
Vincent Massol 35.2 86
Raluca Moisa 93.4 87 [[image:wysiwyg.png||style="border: 1px solid black;"]]
Guillaume Lerouge 1.73 88
Sorin Burjan 70.3 89 {{velocity}}
90 {{html wiki="true"}}
Vincent Massol 35.2 91 #info("Starting with XWiki Enterprise 1.7 we now have 2 WYSIWYG editors and we are phasing out the old editor (based on TinyMCE) that you'll be automatically using if your documents are written in XWiki Syntax 1.0. If your [[document is using the XWiki Syntax 2.0>>#HChoosingasyntax]] or if your wiki is [[configured to use the XWiki Syntax 2.0 by default>>platform:AdminGuide.Configuration#HConfiguringWikiSyntaxesanddefaultSyntax]] then you'll be using automatically the [[new WYSIWYG editor (based on GWT)>>WysiwygEditor]].")
Sorin Burjan 70.3 92 {{/html}}
93 {{/velocity}}
Vincent Massol 19.7 94
Guillaume Lerouge 31.1 95 Read the [[documentation for using the new WYSIWYG editor>>WysiwygEditor]] for more details.
Vincent Massol 1.86 96
Sorin Burjan 102.2 97 = Setting the page parent =
Sorin Burjan 101.2 98
Sorin Burjan 102.2 99 In order to have an organized structure of your page, when you create a new page in a space, its parent will be automatically set to be the WebHome page of the space in which you create the page.
100
101 If you want to change the parent of the page, you have to edit the page with wiki or wysiwyg editors.
102
Sorin Burjan 102.3 103 [[image:documentParent.png||style="border: 1px solid black;"]]
Sorin Burjan 102.2 104
105 Click on the small pencil above the page title in order to edit the page parent.
106
Sorin Burjan 102.3 107 [[image:documentParentCollapsed.png||style="border: 1px solid black;"]]
Sorin Burjan 102.2 108
Sorin Burjan 102.3 109 {{info}}
Sorin Burjan 103.3 110 If the page has no parent set, the breadcrumbs feature will not show the path to navigate from the Main.WebHome to the page. These pages are called orphan pages.
Sorin Burjan 102.3 111 {{/info}}
112
Sorin Burjan 103.2 113 [[image:documentParentNoParent.png||style="border: 1px solid black;"]]
Sorin Burjan 102.3 114
115 [[image:pageNoBreadcrumb.png||style="border: 1px solid black;"]]
116
Sorin Burjan 103.4 117 {{warning}}
118 Please note that when you copy a page, its parent field will not be updated accordingly to the new space the copy is in. You will have to do that manually.
119 {{/warning}}
120
Silvia Macovei 43.3 121 = Form editing mode (aka inline mode) =
Guillaume Lerouge 1.73 122
Vincent Massol 36.1 123 Inline mode, or Form mode, is a special feature of XWiki, that allows administrators to define patterns of structured information (like a blog entry, or a standard tax form). Pages containing such structured information can be edited and re-edited as simple HTML Forms, which have (almost) the same structure as the displayed page. Thus, when clicking the edit button, it seems that the page content can be edited in-place, or inline and the form view is automatically displayed.
Silvia Macovei 28.1 124
Vincent Massol 36.1 125 Technically the inline mode is triggered automatically differently whether the page is written in XWiki Syntax 1.0 or 2.0, using the following algorithm:
Sorin Burjan 70.3 126
Vincent Massol 36.1 127 * XWiki Syntax 1.0: If the page contains a call to ###includeForm()##
128 * XWiki Syntax 2.0: If the page is including another page which itself contains an object of the type ##XWiki.SheetClass##
Guillaume Lerouge 1.73 129
Vincent Massol 36.1 130 Note that it is beyond the scope of this simple guide to explain the programming technique supporting this feature. Please check the [[Developer's Guide>>DevGuide.WebHome]] to find out more about programming with Objects/Classes and Forms.
Guillaume Lerouge 1.73 131
Silvia Macovei 43.3 132 = Objects editing mode =
Guillaume Lerouge 1.73 133
Silvia Macovei 35.4 134 In XWiki it's possible to attach Objects to pages. Objects are simple sets of properties with values that add additional information about a page. For example a security right can be added to a page to control its rights, a blog object is attached to a page representing a blog entry, etc. Again, it's beyond this simple guide to explain this programming technique. Please check the [[Developer's Guide>>DevGuide.WebHome]] to know more about programming with Objects/Classes.
Guillaume Lerouge 1.73 135
Raluca Moisa 93.4 136 [[image:ObjectEditor.png||style="border: 1px solid black;"]]
137
Silvia Macovei 43.3 138 = Classes editing mode =
Guillaume Lerouge 1.73 139
Silvia Macovei 35.4 140 We've seen that some pages can have Objects attached to them. Some pages can also be Object definitions, a.k.a Classes. The Classes editing mode calls the class editor on the current page, allowing to edit the Classes attached to the document. Again, it's beyond this simple guide to explain this programming technique. Please check the [[Developer's Guide>>DevGuide.WebHome]] to find out more about programming with Objects/Classes.
Raluca Moisa 93.4 141 [[image:ClassEditor.png||style="border: 1px solid black;"]]
Guillaume Lerouge 1.73 142
Silvia Macovei 43.3 143 = Page Access Rights editing mode =
Guillaume Lerouge 1.73 144
Guillaume Lerouge 31.1 145 This mode allows you to control the access rights for the page you're viewing (you need to have the correct access rights to modify a page's rights of course!). See the [[Rights Management>>Features.RightsManagement]] topic for more information.
Guillaume Lerouge 1.75 146
Silvia Macovei 43.3 147 = Full Screen Mode =
Guillaume Lerouge 1.75 148
Sorin Burjan 45.1 149 From version 1.1 onwards, a full-screen mode is available in XWiki. When editing a page either in Wiki or WYSIWYG mode, clicking on the green button at the top right of the edit box will send the editor in full-screen mode. You can then edit your page as usual and click on the green button to return to the usual interface when you are finished.
Guillaume Lerouge 1.75 150
Guillaume Lerouge 31.1 151 //The button you need to click to go in full-screen mode//
Raluca Moisa 93.4 152 [[image:FullScreenButton.png||style="border: 1px solid black;"]]
Guillaume Lerouge 1.77 153
Sorin Burjan 45.1 154 //Editing while in full-screen mode//
Raluca Moisa 93.4 155 [[image:FullScreen.png||style="border: 1px solid black;"]]
Vincent Massol 95.1 156
157 = Title Behavior =
158
159 Pages have both names and titles. The page name is used in the URL to the page while the title is used to display a user-friendly short description of the page. The title is used for example as the top level headings when viewing a page.
160
161 Page titles can be set while editing documents in Wiki or WYSIWYG modes.
162
163 Titles are not mandatory by default but it's possible to [[configure XWiki to make titles mandatory>>platform:AdminGuide.Configuration#HTitlebehavior]].
164
Vincent Massol 95.2 165 When a page has not title set then XWiki tries to compute it by extracting the topmost heading from the document's content. For example if you have a heading level 1, it'll be used as the page title. If you don't have level 1 headings but have a level 2 heading it'll be used as the page title when viewing the page too. The heading level depth XWiki uses for titles is controlled in [[XWiki's title configuration>>platform:AdminGuide.Configuration#HTitlebehavior]]. If no heading is found or if the topmost heading has a level below the configured level then the page name is used as the title.
Vincent Massol 95.1 166
167 Currently title content is parsed using Velocity so you're allowed to put Velocity content in there (this is for example useful when wanting to internationalize titles). Since you're allowed to use any wiki syntax in headings, if a page doesn't have a title set (and titles are not mandatory) then any wiki markup in the topmost headings will beget rendered when displaying the extracted title for that page.

Get Connected