Changes for page Sandbox


on 2022-11-01 05:01


on 2022-04-02 07:37
Summary
Details
- Page properties
-
- Content
-
... ... @@ -2,70 +2,6 @@ 2 2 3 3 Quagmyre 4 4 5 -External Link ([[good>>https://files.quagmyre.com/index.html]]) 6 - 7 -External Link ([[bad>>https://files.quagmyre.com/nosuchfile.html]]) 8 - 9 - 10 -{{groovy}} 11 -import com.xpn.xwiki.web.* 12 -import org.xwiki.rendering.transformation.* 13 - 14 -def checker = Utils.getComponent(Transformation.class, "linkchecker") 15 - 16 -print "Link checker queue size = ${checker.linkQueue.size()}" 17 -{{/groovy}} 18 - 19 - 20 -{{groovy}} 21 -import groovy.util.logging.* 22 -import org.xwiki.observation.* 23 -import org.xwiki.observation.event.* 24 -import org.xwiki.rendering.transformation.linkchecker.* 25 -import com.xpn.xwiki.web.* 26 -import com.xpn.xwiki.* 27 - 28 -@Log 29 -class MyLinkListener implements EventListener 30 -{ 31 - def xwiki 32 - def context 33 - 34 - MyLinkListener(xwiki, context) 35 - { 36 - this.xwiki = xwiki 37 - this.context = context 38 - } 39 - 40 - String getName() 41 - { 42 - return "myLinkListener" 43 - } 44 - 45 - List<Event> getEvents() 46 - { 47 - return Arrays.asList(new InvalidURLEvent()) 48 - } 49 - 50 - void onEvent(Event event, Object eventSource, Object data) 51 - { 52 - def url = eventSource.get("url") 53 - def source = eventSource.get("source") 54 - def state = eventSource.get("state") 55 - 56 - log.info("Error for {url} in ${source} - Response code: ${state.getResponseCode()} - Checked: ${String.format('%tF %<tT', state.getLastCheckedTime())}") 57 - } 58 -} 59 - 60 -// Register against the Observation Manager 61 -def observation = Utils.getComponent(ObservationManager.class) 62 -observation.removeListener("myLinkListener") 63 -def listener = new MyLinkListener(xwiki, xcontext) 64 -observation.addListener(listener) 65 -{{/groovy}} 66 - 67 - 68 - 69 69 The sandbox is a part of your wiki that you can freely modify. It's meant to let you practice editing. You will discover how page editing works and create new pages. Simply click on **Edit** to get started! 70 70 71 71 {{info}} ... ... @@ -180,62 +180,73 @@ 180 180 181 181 You can insert images in your wiki pages: 182 182 183 - [[image:XWikiLogo.png]]119 +image:XWikiLogo.png 184 184 185 185 = Macros = 186 186 187 187 Macros allow you to make wiki content look better and to add additional features to your wiki. Here are 2 examples of how macros can be used in wiki pages: 188 188 125 +== Warning Macro == 126 + 127 +{{warning}} 128 +Hello World 129 +{{/warning}} 130 + 131 +{{warning title="Title"}} 132 +Hello World 133 +{{/warning}} 134 + 189 189 == Box Macro == 190 190 191 -{{box}} 137 +{{box title="Title"}} 192 192 box 193 193 {{/box}} 194 194 195 -{{box title=" **Title**"}}141 +{{box title="Title"}} 196 196 box 197 197 {{/box}} 198 198 199 -== ErrorMacro ==145 +== Note Macro == 200 200 201 -{{ error}}202 - Error203 -{{/ error}}147 +{{note title="Title"}} 148 +note 149 +{{/note}} 204 204 205 -{{ errortitle="**Title**"}}206 - Error207 -{{/ error}}151 +{{note title="Title"}} 152 +note 153 +{{/note}} 208 208 209 209 == Info Macro == 210 210 211 -{{info}} 157 +{{info title="Title"}} 212 212 Info 213 213 {{/info}} 214 214 215 -{{info title=" **Title**"}}161 +{{info title="Title"}} 216 216 Info 217 217 {{/info}} 218 218 165 +== Error Macro == 166 + 167 +{{error title="Title"}} 168 +Error 169 +{{/error}} 170 + 171 +{{error title="Title"}} 172 +Error 173 +{{/error}} 174 + 219 219 == Success Macro == 220 220 221 -{{success}} 177 +{{success title="Title"}} 222 222 Success 223 223 {{/success}} 224 224 225 -{{success title=" **Title**"}}181 +{{success title="Title"}} 226 226 Success 227 227 {{/success}} 228 228 229 -== Warning Macro == 230 230 231 -{{warning}} 232 -Hello World 233 -{{/warning}} 234 - 235 -{{warning title="**Title**"}} 236 -Hello World 237 -{{/warning}} 238 - 239 239 == Table of Contents == 240 240 241 241 This macro automatically generates a table of contents of your wiki page based on headings: