Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This is a working example of an advanced link field. It's an CK Editor which is only one line standard richtextfield which has a custom CSS and JS. The field is a one liner and you can just define links. Enter or Shift Enter are blocked. It's only generating an a-Tag without <br> or <p> wrappers.

...

But it has downsides, which are not solved yet, but i guess this should not be a show stopper:

  • At the moment everything is added into one jcr property which is basicly a RichTextField-HTML. But sometimes you would like to have all the specified items in splitted variables. (Link Text, Link Target, Link Href)
  • The asset and the internal Link Picker don't have the ability to add a _blank target. (You can pick it and after that open the link dialog)
  • If you only want to define a link without all the stuff around it you need to manipulate the JS for CK Editor, and add some kind of transformer, as we all know from standard link fields.

Reasoning

Pros:

  • It's all saved into one field which makes it easier 

...