Thank you Caleb!


On Apr 28, 2015, at 5:00 AM, [email protected] wrote:

Send users mailing list submissions to
   [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
   http://lists.xwiki.org/mailman/listinfo/users
or, via email, send a message with subject or body 'help' to
   [email protected]

You can reach the person managing the list at
   [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of users digest..."


Today's Topics:

  1. Re: How to Add WYSIWIG toolbar button (Marius Dumitru Florea)
  2. SSL on Tomcat 7 Xwiki (Niko B.)
  3. Re: SSL on Tomcat 7 Xwiki (Caleb James DeLisle)
  4. Re: How to Add WYSIWIG toolbar button (Mahomed Hussein)


----------------------------------------------------------------------

Message: 1
Date: Mon, 27 Apr 2015 21:17:52 +0300
From: Marius Dumitru Florea <[email protected]>
To: XWiki Users <[email protected]>
Subject: Re: [xwiki-users] How to Add WYSIWIG toolbar button
Message-ID:
   <calzcbbz4o0qor0vtpxo-xmzkxvk1cus3fmpqfzarrmt9cga...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

On Fri, Apr 24, 2015 at 7:27 PM, Mahomed Hussein
<[email protected]> wrote:
> Hi
> 
> I have a problem where users want to highlight text in the WYSIWIG editor and 
> press a button on the toolbar to automatically add the {{code}}, {{warning}} 
> etc. start and end tags to the text. I know how to add a macro button and to 
> style it. But the problem with the macro is that it pops up a form with a 
> text area that you then need to fill in with text you want to put inside the 
> tags. The behaviour I am looking for is similar to highlighting text and then 
> pressing the Bold button on the toolbar.
> 
> I have done some digging/searching/googling and found the simpledittoolbar.vm 
> and I?ve customised this and added the copy to my skin. I have added the 
> following code in the relevant sections and it works perfectly when I click 
> Edit>Wiki but it doesn?t show on the toolbar when I click Edit>WYSIWIG. I am 
> running XWiki 7.0

simpledittoolbar.vm affects only the wiki editor.

> 
> #set($discard = $syntax10Elements.add(['code', '{{code}}', '{{/code}}', 
> 'page_code']))
> #set($discard = $syntax20Elements.add(['code', '{{code}}', '{{/code}}', 
> 'page_code']))
> #set($discard = $confluence10Elements.add(['code', '{{code}}', '{{/code}}', 
> 'page_code']))

> So any idea how I can make the button show on the WYSIWIG toolbar? 
> Alternatively how do I make the macro execute on the highlighted text?

It's not simple. You have two options:

(1) Put a button on the toolbar with something like
http://extensions.xwiki.org/xwiki/bin/view/Extension/WYSIWYG+Editor+Module#HAdjusttheeditorUIfromaJavaScriptExtension
then listen on click and use
http://extensions.xwiki.org/xwiki/bin/view/Extension/WYSIWYG+Editor+Module#HWysiwygEditor
#getSelectionRange() to access the selected text and then
#getCommandManager() to
http://extensions.xwiki.org/xwiki/bin/view/Extension/WYSIWYG+Editor+Module#HCommandManager
#execute the 'macroInsert' command. The complex part is to understand
the format of the command parameter. You can check
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-client/src/main/java/org/xwiki/gwt/wysiwyg/client/plugin/macro/MacroCall.java
.

(2) Write a plugin for the WYSIWYG editor from Java, but for this
you'll have to recompile the editor and thus you'll end up with a
custom editor, which is harder to maintain over time and may cause
upgrade headaches.

Hope this helps,
Marius

> 
> Thanks in advance.
> 
> 
> Kind regards,
> 
> Mahomed
> 
> 
> 
> 
> 
> 
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users


------------------------------

Message: 2
Date: Mon, 27 Apr 2015 11:57:07 -0700
From: "Niko B." <[email protected]>
To: users <[email protected]>
Subject: [xwiki-users] SSL on Tomcat 7 Xwiki
Message-ID:
   <cab3iuq45z7vczqhqs56f_o0z1pj7bzfuci-yc9+5vxwzme5...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

Hi,

I am trying to setup SSL/TLS on xwiki running tomcat7. I am trying to find
the tomcat conf file and the java directory but they dont seem to be in the
default location. Since we are running tomcat, the ssl certificate would
have to be in tomcat correct? Would this be easier in Jetty? Does anyone
have instructions on how to setup SSL/TLS on xwiki or can someone point me
in the right direction?

Thanks in advance!


------------------------------

Message: 3
Date: Tue, 28 Apr 2015 10:11:43 +0200
From: Caleb James DeLisle <[email protected]>
To: XWiki Users <[email protected]>
Subject: Re: [xwiki-users] SSL on Tomcat 7 Xwiki
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8

I know it's possible to setup tomcat itself to do TLS but personally I would
look at using an Apache/AJP connector or Nginx/HTTP for handling the TLS and
proxying back to the Tomcat server. I know Apache/AJP -> Tomcat to be well
tested but I'll throw in a word for Nginx/HTTP -> Jetty just because I have
a personal soft spot for it :)

Thanks,
Caleb

> On 04/27/2015 08:57 PM, Niko B. wrote:
> Hi,
> 
> I am trying to setup SSL/TLS on xwiki running tomcat7. I am trying to find
> the tomcat conf file and the java directory but they dont seem to be in the
> default location. Since we are running tomcat, the ssl certificate would
> have to be in tomcat correct? Would this be easier in Jetty? Does anyone
> have instructions on how to setup SSL/TLS on xwiki or can someone point me
> in the right direction?
> 
> Thanks in advance!
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users

-- 
Satire is the escape hatch from the cycle of sorrow, hatred and violence. 
#JeSuisCharlie


------------------------------

Message: 4
Date: Tue, 28 Apr 2015 09:31:57 +0000
From: Mahomed Hussein <[email protected]>
To: XWiki Users <[email protected]>
Subject: Re: [xwiki-users] How to Add WYSIWIG toolbar button
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"

Hi Marius

Thank you very much for this info. It is very helpful. Unfortunately I may take 
me a bit of time to assimilate and understand it all :-) But I will certainly 
give it a try in the next few weeks. I'll do my best to remember to post my 
results.


Kind regards,

Mahomed




-----Original Message-----
From: users [mailto:[email protected]] On Behalf Of Marius Dumitru Florea
Sent: 27 April 2015 19:18
To: XWiki Users
Subject: Re: [xwiki-users] How to Add WYSIWIG toolbar button

On Fri, Apr 24, 2015 at 7:27 PM, Mahomed Hussein
<[email protected]> wrote:
> Hi
> 
> I have a problem where users want to highlight text in the WYSIWIG editor and 
> press a button on the toolbar to automatically add the {{code}}, {{warning}} 
> etc. start and end tags to the text. I know how to add a macro button and to 
> style it. But the problem with the macro is that it pops up a form with a 
> text area that you then need to fill in with text you want to put inside the 
> tags. The behaviour I am looking for is similar to highlighting text and then 
> pressing the Bold button on the toolbar.
> 
> I have done some digging/searching/googling and found the simpledittoolbar.vm 
> and I?ve customised this and added the copy to my skin. I have added the 
> following code in the relevant sections and it works perfectly when I click 
> Edit>Wiki but it doesn?t show on the toolbar when I click Edit>WYSIWIG. I am 
> running XWiki 7.0

simpledittoolbar.vm affects only the wiki editor.

> 
> #set($discard = $syntax10Elements.add(['code', '{{code}}', '{{/code}}', 
> 'page_code']))
> #set($discard = $syntax20Elements.add(['code', '{{code}}', '{{/code}}', 
> 'page_code']))
> #set($discard = $confluence10Elements.add(['code', '{{code}}', '{{/code}}', 
> 'page_code']))

> So any idea how I can make the button show on the WYSIWIG toolbar? 
> Alternatively how do I make the macro execute on the highlighted text?

It's not simple. You have two options:

(1) Put a button on the toolbar with something like
http://extensions.xwiki.org/xwiki/bin/view/Extension/WYSIWYG+Editor+Module#HAdjusttheeditorUIfromaJavaScriptExtension
then listen on click and use
http://extensions.xwiki.org/xwiki/bin/view/Extension/WYSIWYG+Editor+Module#HWysiwygEditor
#getSelectionRange() to access the selected text and then
#getCommandManager() to
http://extensions.xwiki.org/xwiki/bin/view/Extension/WYSIWYG+Editor+Module#HCommandManager
#execute the 'macroInsert' command. The complex part is to understand
the format of the command parameter. You can check
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-client/src/main/java/org/xwiki/gwt/wysiwyg/client/plugin/macro/MacroCall.java
.

(2) Write a plugin for the WYSIWYG editor from Java, but for this
you'll have to recompile the editor and thus you'll end up with a
custom editor, which is harder to maintain over time and may cause
upgrade headaches.

Hope this helps,
Marius

> 
> Thanks in advance.
> 
> 
> Kind regards,
> 
> Mahomed
> 
> 
> 
> 
> 
> 
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

------------------------------

Subject: Digest Footer

_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users


------------------------------

End of users Digest, Vol 93, Issue 57
*************************************
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to