Wiki source code of PageEditing

Version 41.1 by KevinSmith on 2009/12/26

Hide last authors
KevinSmith 41.1 1 (% class="floatinginfobox" %)
2 (((
Guillaume Lerouge 33.1 3 **Contents**
4
KevinSmith 41.1 5 {{toc start="2" depth="3" numbered="false" scope="page"/}}
Guillaume Lerouge 33.1 6 )))
7
Guillaume Lerouge 31.1 8 = Page Editing =
Guillaume Lerouge 1.73 9
Silvia Macovei 40.1 10 In XWiki all pages are editable (provided you are logged in and/or have the edit rights). To edit a page, all you have 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 11
Silvia Macovei 40.1 12 For instance if you're using the [[Toucan skin>>code:Skins.ToucanSkin]] you should see what is on the image below:
13
Guillaume Lerouge 31.1 14 image:EditionSimpleMode.PNG
Guillaume Lerouge 1.73 15
Silvia Macovei 40.2 16 If you're using the [[Colibri skin>>code:Skins.ToucanSkin]] with the new Action Menus introduced in [[XWiki 2.1>>xwiki:Main.ReleaseNotesXWikiEnterprise21]] you should see the following:
Silvia Macovei 40.1 17
18 image:EditionSimpleModeColibri.PNG
19
Guillaume Lerouge 31.1 20 == Simple and Advanced edition modes ==
Guillaume Lerouge 1.73 21
KevinSmith 41.1 22 Since XWiki is an [[application wiki>>Main.SecondGenerationWiki]], all users will not need to use the same features. This is why XWiki comes with a Simple and an Advanced edition mode. Users can easily choose which edition 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 edition modes they may not be familiar with. By default new users are given the Simple edition mode but they can switch to the Advanced mode as described below.[[Online High School>>http://www.nationhighschool.com/]]
Guillaume Lerouge 1.73 23
KevinSmith 41.1 24
25
Guillaume Lerouge 31.1 26 === Simple Mode ===
Guillaume Lerouge 1.73 27
Silvia Macovei 35.4 28 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 edition modes available in Simple mode are:
Guillaume Lerouge 1.73 29
Guillaume Lerouge 31.1 30 * [[Wiki Edition Mode>>Features.PageEditing#HWikieditingmode]]
31 * [[WYSIWYG Edition Mode>>Features.PageEditing#HWYSIWYGeditingmode]]
Guillaume Lerouge 1.73 32
Guillaume Lerouge 31.1 33 === Advanced Mode ===
Guillaume Lerouge 1.73 34
Silvia Macovei 27.3 35 Experienced XWiki users will want to use all the edition 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 will display the full edition 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 36
Guillaume Lerouge 31.1 37 image:AdvancedMode.PNG
Guillaume Lerouge 1.73 38
Silvia Macovei 35.4 39 Once you have switched to advanced mode, the "Edit" menu will look like this on mouse over:
Guillaume Lerouge 1.73 40
Guillaume Lerouge 31.1 41 image:EditAdvancedMode.PNG
Guillaume Lerouge 1.73 42
43 This will give you access to the following edition modes:
44
Guillaume Lerouge 31.1 45 * [[Form Edition Mode>>Features.PageEditing#HFormeditingmode28akainlinemode29]]
46 * [[Object Edition Mode>>Features.PageEditing#HObjectseditingmode]]
47 * [[Class Edition Mode>>Features.PageEditing#HClasseseditingmode]]
48 * [[Access Rights Edition Mode>>Features.PageEditing#HPageAccessRightseditingmode]]
Guillaume Lerouge 1.73 49
Guillaume Lerouge 31.1 50 == Common edit actions ==
Sergiu Dumitriu 16.1 51
52 All edit modes have some or all of the elements in the following image:
53
Guillaume Lerouge 31.1 54 image:EditActions.PNG
Sergiu Dumitriu 16.1 55
KevinSmith 41.1 56 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.[[GED Online Test>>http://www.nationhighschool.com/ged.asp]]
Sergiu Dumitriu 16.1 57
KevinSmith 41.1 58
Silvia Macovei 27.4 59 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 60
61 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.
62
Silvia Macovei 35.4 63 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 64
Guillaume Lerouge 31.1 65 The **Cancel** button causes the changes to be discarded and forwards to the document view mode.
Sergiu Dumitriu 16.1 66
Guillaume Lerouge 31.1 67 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 68
KevinSmith 41.1 69
Guillaume Lerouge 31.1 70 The **Save & Continue** button submits the current changes and returns to the current edit mode.
Sergiu Dumitriu 16.1 71
Guillaume Lerouge 31.1 72 The **Save & View** button submits the current changes and returns to the document view mode.
Sergiu Dumitriu 16.1 73
Guillaume Lerouge 31.1 74 == Wiki editing mode ==
Guillaume Lerouge 1.73 75
KevinSmith 41.1 76 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.[[Homeschooling>>http://www.nationhighschool.com/home-schooling.asp]]
Guillaume Lerouge 1.73 77
Silvia Macovei 27.2 78 This is what the wiki edition mode looks like with the Toucan skin:
Guillaume Lerouge 1.73 79
Guillaume Lerouge 31.1 80 image:WikiEdition.PNG
Guillaume Lerouge 1.73 81
Guillaume Lerouge 31.1 82 === Choosing a Syntax ===
Vincent Massol 18.1 83
Guillaume Lerouge 31.1 84 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 Toucan Skin:
Vincent Massol 18.1 85
Guillaume Lerouge 31.1 86 image:syntax.png
Vincent Massol 18.1 87
Vincent Massol 35.2 88 {{velocity}}{{html wiki="true"}}
89 #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]].")
90 {{/html}}{{/velocity}}
Vincent Massol 19.3 91
Guillaume Lerouge 31.1 92 == WYSIWYG editing mode ==
Guillaume Lerouge 1.73 93
KevinSmith 41.1 94 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.[[Earn high school diploma>>http://www.nationhighschool.com/eligibility/index.asp]]
Vincent Massol 35.2 95
KevinSmith 41.1 96
Guillaume Lerouge 31.1 97 image:wysiwyg.png
Guillaume Lerouge 1.73 98
Vincent Massol 35.2 99 {{velocity}}{{html wiki="true"}}
100 #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]].")
101 {{/html}}{{/velocity}}
Vincent Massol 19.7 102
Guillaume Lerouge 31.1 103 Read the [[documentation for using the new WYSIWYG editor>>WysiwygEditor]] for more details.
Vincent Massol 1.86 104
Guillaume Lerouge 31.1 105 == Form editing mode (aka inline mode) ==
Guillaume Lerouge 1.73 106
Vincent Massol 36.1 107 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 108
Vincent Massol 36.1 109 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:
KevinSmith 41.1 110
Vincent Massol 36.1 111 * XWiki Syntax 1.0: If the page contains a call to ###includeForm()##
112 * 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 113
Vincent Massol 36.1 114 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 115
Guillaume Lerouge 31.1 116 == Objects editing mode ==
Guillaume Lerouge 1.73 117
Silvia Macovei 35.4 118 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 119
Guillaume Lerouge 31.1 120 == Classes editing mode ==
Guillaume Lerouge 1.73 121
Silvia Macovei 35.4 122 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.
Guillaume Lerouge 1.73 123
Guillaume Lerouge 31.1 124 == Page Access Rights editing mode ==
Guillaume Lerouge 1.73 125
Guillaume Lerouge 31.1 126 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 127
Guillaume Lerouge 31.1 128 == Full Screen Mode ==
Guillaume Lerouge 1.75 129
KevinSmith 41.1 130 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 edition 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.[[Nation High School Reviews>>http://www.nationhighschoolscam.com/NationHighSchool/testimonial.asp]]
Guillaume Lerouge 1.75 131
KevinSmith 41.1 132
Guillaume Lerouge 31.1 133 //The button you need to click to go in full-screen mode//
134 image:FullScreenButton.PNG
Guillaume Lerouge 1.77 135
Guillaume Lerouge 31.1 136 //Edition while in full-screen mode//
137 image:FullScreen.PNG

Get Connected