atom feed8 messages in org.xwiki.usersRe: [xwiki-users] Setup a sepparate s...
FromSent OnAttachments
dullfigMay 25, 2016 10:05 am 
Marius Dumitru FloreaMay 26, 2016 1:35 am 
Daniel UllfigMay 26, 2016 8:57 am 
Daniel UllfigMay 26, 2016 10:01 pm 
Vincent MassolMay 27, 2016 12:04 am 
Daniel UllfigMay 27, 2016 8:52 am 
Vincent MassolMay 27, 2016 8:54 am 
Daniel UllfigMay 27, 2016 9:19 am 
Subject:Re: [xwiki-users] Setup a sepparate space for javascript
From:Daniel Ullfig (dan@grmcompany.com)
Date:May 26, 2016 10:01:20 pm
List:org.xwiki.users

I was looking around XWiki, and there does not seem to be a Class Page for the class JavaScriptExtensionClass, even though it is a class, and there are Class Documents for a whole bunch of other xwiki classes. This kinda breaks the paradigm, doesn't it? It should at least be some kind of read-only page. Because then it would be real simple to add a custom editor for javascript, by changing the ClassSheet attached to the JavaScriptExtensionClass page. Just an idea.

Dan

-----Original Message----- From: Daniel Ullfig Sent: Thursday, May 26, 2016 8:57 AM To: XWiki Users Subject: Re: [xwiki-users] Setup a sepparate space for javascript

Thanks for the tip! I was in the middle of embedding Ace Editor in a page. Got it to work. displays javascript beautifully. But now I would have to work on integrating Rest calls, so that Ace can save the scripts back to the page.

Isn't there a way of overriding the Object Editor, so that when it sees that you are opening a JavaScriptExtension, it uses Ace instead of the plain text field?

PS.: there's so many questions I have about xwiki! It's a treasure trove of functionality, but there's a vast amount of info to wade through. Like, I don't quite understand the instructions on how to add a webjar to xwiki. Not every xwiki user is a seasoned web developer ;-)

-----Original Message----- From: Marius Dumitru Florea Sent: Thursday, May 26, 2016 1:35 AM To: XWiki Users Subject: Re: [xwiki-users] Setup a sepparate space for javascript

On Wed, May 25, 2016 at 8:05 PM, dullfig <dan@grmcompany.com> wrote:

Hello:

I was wondering if anyone else has done this. My application is starting to need a whole bunch of javascript, and I was thinking of setting up a separate space (maybe call it js) where there is nothing but pages with javascript objects attached.

That way I could set up a ClassSheet for that space,

ClassSheets, as their name suggests, are bound to a class not to a space. So you don't have to move the pages with JSX objects in a separate space. You can create a new class, with a sheet that embeds ACE, and add an object of this class to all the pages you want to edit with ACE. But even this is not needed as there are already some extensions available that provide syntax highlighting, if that's what you are looking for.

Hope this helps, Marius

whith an embedded javascript editor (ace editor) to make editing the javascript easier.