Customize system:html editor to include internal link

15 views
Skip to first unread message

Frederic Close

unread,
Oct 22, 2014, 5:23:35 AM10/22/14
to hippo-c...@googlegroups.com
Hello,

I'm using Hippo 7.8.9 I would like to customize the default html editor (type: Html  i.e. system.Html) to be able to create internal link

I go to 

/hippo:namespaces/system/Html/editor:templates/_default_/root

add properties:
Xinha.config.toolbar : createlink
Xinha.plugins : CreateLink
(see screenshot 1)

I also added the node 
/hippo:namespaces/system/Html/editor:templates/_default_/root/Xinha.plugins.CreateLink
(see screenshot 2)


When I click on the toolbar button to create an internal link I have following javascript exception:

Uncaught TypeError: Cannot read property 'indexOf' of null xinha-modal.js?w:lm=1412843950:9
    ModalDialog xinha-modal.js?w:lm=1412843950:9
    CreateLink.prepareDialog CreateLink.js:150
    CreateLink.show VM1693:6
    CreateLink.editor.config.btnList.createlink.(anonymous function) CreateLink.js:23
    (anonymous function) XinhaCore.js:1984



Any idea what's wrong, what I am missing ?




--Frederic


screenshot 1:


screenshot 2:




Jeroen Reijn

unread,
Oct 22, 2014, 5:40:38 AM10/22/14
to hippo-c...@googlegroups.com
Hi Frederic,

I don't think that will work due to the nature of the system:html type. (it does not allow you to store links underneath the actual backing model), which is a normal String property in this case. The internal link plugin needs to be able to store a hippo:mirror as a childnode of the node, which I don't think will work, but I've never tried it in myself.

Is there a specific reason why you are using the system:html type and not the hippostd:html type?

Jeroen

--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.
Visit this group at http://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.



--
Jeroen Reijn
Hippo

Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 101 Main Street, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com

http://about.me/jeroenreijn

Frederic Close

unread,
Oct 22, 2014, 5:47:39 AM10/22/14
to hippo-c...@googlegroups.com
Thanks Jeroen,

that makes it clear, the field is used for  summary and we wanted to limit the possibilities of the customer for editing that field that's why we chose system:html.

I added the possiblity to add (un)ordered list to that editor with success and was wondering if it would of to add internal / external links.


regards

Frederic
Reply all
Reply to author
Forward
0 new messages