Changes for page Content
Last modified by superadmin on 2025/09/10 13:22
From version 4.1
edited by superadmin
on 2025/09/10 13:22
on 2025/09/10 13:22
Change comment:
Install extension [org.xwiki.platform:xwiki-platform-appwithinminutes-ui/17.7.0]
To version 1.1
edited by Laura Sagunski
on 2022/09/27 12:40
on 2022/09/27 12:40
Change comment:
Install extension [org.xwiki.platform:xwiki-platform-appwithinminutes-ui/14.6]
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki.s uperadmin1 +xwiki:XWiki.sagunski - Content
-
... ... @@ -1,19 +1,22 @@ 1 1 {{velocity}} 2 2 #if ($type == 'edit') 3 3 #set ($className = $object.getxWikiClass().name) 4 - #set ($id = "${prefix}${name}") 5 5 #if ($doc.fullName == $className) 6 6 ## We are editing the class so the content must be read from / written to the template document. 7 7 #set ($name = 'templateContent') 8 8 #set ($editedDocument = $xwiki.getDocument("$stringtool.removeEnd($className, 'Class')Template")) 8 + ## Don't load the WYSIWYG editor when editing the class, because it's too heavy. 9 + #set ($useWysiwygEditor = false) 9 9 #else 10 10 ## We are editing an application entry so the content must be read from / written to the current document. 11 11 #set ($name = 'content') 12 12 #set ($editedDocument = $tdoc) 14 + ## Use the preferred content editor. 15 + #set ($useWysiwygEditor = $xwiki.getUserPreference('editor') == 'Wysiwyg') 13 13 #end 14 - ## Use the preferred content editor. 15 - #set ($useWysiwygEditor = $xwiki.getUserPreference('editor') == 'Wysiwyg') 16 16 {{html clean="false"}} 18 + ## The "content" id is expected by some JavaScript and CSS code. 19 + #set ($id = 'content') 17 17 #if (!$useWysiwygEditor) 18 18 <div id="xwikieditcontentinner"> 19 19 ## The tool bar may have an entry to insert an HTML macro. Make sure it doesn't break the HTML macro we are currently in. ... ... @@ -20,7 +20,7 @@ 20 20 #set ($toolBar = "#template('simpleedittoolbar.vm')") 21 21 $!toolBar.replace('{{', '{{') 22 22 ## Display a simple textarea. 23 - <textarea id="$ escapetool.xml($id)" cols="80" rows="25" name="$name">$escapetool.xml($editedDocument.content)</textarea>26 + <textarea id="$id" cols="80" rows="25" name="$name">$escapetool.xml($editedDocument.content)</textarea> 24 24 #end 25 25 #if ($useWysiwygEditor) 26 26 $!services.edit.syntaxContent.wysiwyg($editedDocument.content, $editedDocument.syntax, { ... ... @@ -28,8 +28,7 @@ 28 28 'name': "$name", 29 29 'rows': 25, 30 30 'cols': 80, 31 - 'full': true, 32 - 'restricted': $editedDocument.isRestricted() 34 + 'full': true 33 33 }) 34 34 #else 35 35 </div> ... ... @@ -36,12 +36,9 @@ 36 36 #end 37 37 {{/html}} 38 38 #elseif ("$!type" != '') 39 - ## Display the content of the current document without using any sheet. We can't use the include macro here (with the 40 - ## author parameter) because the content may have unsaved changes (e.g. on preview action). We make sure that the HTML 41 - ## macro is not closed unintentionally, even though the XHTML printer protects us against this, just to be extra safe. 42 - {{html}}$services.display.content($tdoc, { 43 - 'displayerHint': 'default' 44 - }).replace('{{/html}}', '&#123;&#123;/html&#125;&#125;'){{/html}} 41 + ## Include the content of the current document. 42 + ## Escape {{ in the rendered content to be sure that the HTML macro is not closed unintentionally. 43 + {{html}}$tdoc.getRenderedContent($tdoc.content, $tdoc.syntax.toIdString()).replace('{{', '&#123;&#123;'){{/html}} 45 45 #else 46 46 The display mode is not specified! 47 47 #end
- AppWithinMinutes.FormFieldClass[0]
-
- Category
-
... ... @@ -1,1 +1,0 @@ 1 -AppWithinMinutes.Document - Icon
-
... ... @@ -1,1 +1,0 @@ 1 -edit - Priority
-
... ... @@ -1,1 +1,0 @@ 1 -0