Xinha InsertSnippet configuration

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Xinha InsertSnippet configuration

david
Hi Hippo community,

Does anyone know how to set up Xinha InsertSnippet plugin?
I'd like to add my own snippets but don't know how to declare them...

I've successfullly added the plugin to the editor (Xinha.plugin and toolbar): that wasn't a big deal ;) but now, I'm stuck at trying to declare a customSnippet.js file with only my own HTML fragments...

Any help appreciated.

Regards,

David

_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: Xinha InsertSnippet configuration

Mathijs Brand
Hi David,

You have to customize your the xinha plugin in the cms module. Just add:
Add cms/src/main/webapp/xinha/xinha/plugins/InsertSnippet/demosnippets.js

This file should contain your snippets like here:
http://trac.xinha.org/browser/trunk/plugins/InsertSnippet/demosnippets.js

Hope this helps you further.

Kind regards,
Mathijs Brand

On Thu, Nov 8, 2012 at 5:19 AM, David Martin <[hidden email]> wrote:

>
> Hi Hippo community,
>
> Does anyone know how to set up Xinha InsertSnippet plugin?
> I'd like to add my own snippets but don't know how to declare them...
>
> I've successfullly added the plugin to the editor (Xinha.plugin and toolbar): that wasn't a big deal ;) but now, I'm stuck at trying to declare a customSnippet.js file with only my own HTML fragments...
>
> Any help appreciated.
>
> Regards,
>
> David
>
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: Xinha InsertSnippet configuration

david
Hi Mathijs,

Thanks for your help. It seems rather simple. Just for me to know: is there any simple way to inject some kind of configuratoin to the plugin, such as a custom snippet description file (instead of overriding demosnippets.js)?

David


On Sat, Nov 10, 2012 at 3:55 PM, Mathijs Brand <[hidden email]> wrote:
Hi David,

You have to customize your the xinha plugin in the cms module. Just add:
Add cms/src/main/webapp/xinha/xinha/plugins/InsertSnippet/demosnippets.js

This file should contain your snippets like here:
http://trac.xinha.org/browser/trunk/plugins/InsertSnippet/demosnippets.js

Hope this helps you further.

Kind regards,
Mathijs Brand

On Thu, Nov 8, 2012 at 5:19 AM, David Martin <[hidden email]> wrote:
>
> Hi Hippo community,
>
> Does anyone know how to set up Xinha InsertSnippet plugin?
> I'd like to add my own snippets but don't know how to declare them...
>
> I've successfullly added the plugin to the editor (Xinha.plugin and toolbar): that wasn't a big deal ;) but now, I'm stuck at trying to declare a customSnippet.js file with only my own HTML fragments...
>
> Any help appreciated.
>
> Regards,
>
> David
>
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html



--
David MARTIN
Ippon Technologies


_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: Xinha InsertSnippet configuration

Mathijs Brand
Good, hope it works for you.

I agree it would be cleaner if you would load, say: mysnippets.js
instead of demosnippets.js. Think you'd have to override the
configuration in insert-snippet.js file.

That's in variable:
'snippets' : _editor_url+"plugins/InsertSnippet/demosnippets.js", //
purely demo purposes, you should change this
in Xinha.Config.prototype.InsertSnippet.

So it looks like it was intended to change this, but not sure how you
actually do that. In the projects I've checked, they choose to
override demosnippets.js. Don't know the exact reason.

On Mon, Nov 12, 2012 at 3:34 AM, David Martin <[hidden email]> wrote:

> Hi Mathijs,
>
> Thanks for your help. It seems rather simple. Just for me to know: is there
> any simple way to inject some kind of configuratoin to the plugin, such as a
> custom snippet description file (instead of overriding demosnippets.js)?
>
> David
>
>
> On Sat, Nov 10, 2012 at 3:55 PM, Mathijs Brand <[hidden email]> wrote:
>>
>> Hi David,
>>
>> You have to customize your the xinha plugin in the cms module. Just add:
>> Add cms/src/main/webapp/xinha/xinha/plugins/InsertSnippet/demosnippets.js
>>
>> This file should contain your snippets like here:
>> http://trac.xinha.org/browser/trunk/plugins/InsertSnippet/demosnippets.js
>>
>> Hope this helps you further.
>>
>> Kind regards,
>> Mathijs Brand
>>
>> On Thu, Nov 8, 2012 at 5:19 AM, David Martin <[hidden email]> wrote:
>> >
>> > Hi Hippo community,
>> >
>> > Does anyone know how to set up Xinha InsertSnippet plugin?
>> > I'd like to add my own snippets but don't know how to declare them...
>> >
>> > I've successfullly added the plugin to the editor (Xinha.plugin and
>> > toolbar): that wasn't a big deal ;) but now, I'm stuck at trying to declare
>> > a customSnippet.js file with only my own HTML fragments...
>> >
>> > Any help appreciated.
>> >
>> > Regards,
>> >
>> > David
>> >
>> > _______________________________________________
>> > Hippo-cms7-user mailing list and forums
>> > http://www.onehippo.org/cms7/support/forums.html
>> _______________________________________________
>> Hippo-cms7-user mailing list and forums
>> http://www.onehippo.org/cms7/support/forums.html
>
>
>
>
> --
> David MARTIN
> Ippon Technologies
>
>
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html