sitegeist/archaeopteryx
composer require sitegeist/archaeopteryx
The missing link editor for Neos
dev-main
- Requires
- neos/neos: ^5.3 || ^7.0 || dev-master
- Requires (dev)
- phpunit/phpunit: ^9.4
- phpstan/phpstan: ^0.12.82
- neos/buildessentials: ^6.3
- mikey179/vfsstream: ^1.6
- squizlabs/php_codesniffer: ^3.5
- jangregor/phpstan-prophecy: ^0.8.0
- spatie/phpunit-snapshot-assertions: ^4.2
Sitegeist.Archaeopteryx
The missing link editor for Neos
⚠ ⚠ ⚠ Currently in alpha ⚠ ⚠ ⚠
This package is currently being tested. Do not use it in production yet! This message will disappear once the package is ready for release.
Authors & Sponsors
- Wilhelm Behncke - behncke@sitegeist.de
- Martin Ficzel - ficzel@sitegeist.de
The development and the public-releases of this package was generously sponsored by our customer https://www.cornelsen.de and our employer https://www.sitegeist.de.
Installation
composer require sitegeist/archaeopteryx:dev-main
Links in Rich Text
Sitegeist.Archaeopteryx is a drop-in replacement for the default Link Editor that is used for Rich Text in Neos. Once installed, you'll notice that the default editor won't show up anymore if you try to add a link to some piece of text.
Instead, a dialog with a lot more options will open:
Sitegeist.Archaeopteryx is fully backwards-compatible. You don't have to worry about links that are already in the system. You can install or uninstall Sitegeist.Archaeopteryx at any point in time while retaining full functionality of all of your links.
Link in Inspector properties
![]() |
![]() |
![]() |
Besides the integration with the Rich Text editor toolbar, Sitegeist.Archaeopteryx also provides an Inspector Editor that can be used as a replacement for Neos.Neos/Inspector/Editors/LinkEditor
.
In case of the Inspector Editor, Sitegeist.Archaeopteryx won't automatically override the default. Instead, you need to configure it as a properties' inspector editor explicitly:
'Vendor.Site:MyContent':
# ...
properties:
link:
type: string
ui:
inspector:
# ...
editor: 'Sitegeist.Archaeopteryx/Inspector/Editors/LinkEditor'
Link Types
Sitegeist.Archaeopteryx ships with 4 built-in Link Types.
Web
The Web
Link Type handles external links, so links that begin with http://
or https://
.
Document
The Document
Link Type handles internal links. The editor offers you a document tree from which you can select documents from within your site. It also offers a search and a node type filter similar to the main document tree in the left side bar of the Neos UI.
The Document
Link Type can be configured as follows:
RTE Configuration:
'Vendor.Site:MyAwesomeNodeTypeWithSomeRichText':
# ...
properties:
text:
type: string
ui:
inlineEditable: true
inline:
editorOptions:
# ..
linking:
#
# Sitegeist.Archaeopteryx will consider the
# startingPoint option in the linking
# section of the RTE configuration.
#
# However, the startingPoint option of the
# extra key 'Sitegeist.Archaeopteryx' from
# below takes precedence.
#
startingPoint: '/sites/vendor-site/node-2ohiwg6ardhhf'
'Sitegeist.Archaeopteryx':
linkTypes:
'Sitegeist.Archaeopteryx:Node':
startingPoint: '/sites/vendor-site/node-40up2e13w4fd9' # Default: current site node
baseNodeType: 'Vendor.Site' # default: Neos.Neos:Document
loadingDepth: 8 # default: 4
Inspector Editor Configuration:
'Vendor.Site:MyAwesomeNodeTypeWithALinkProperty':
# ...
properties:
link:
type: string
ui:
inspector:
# ...
editor: 'Sitegeist.Archaeopteryx/Inspector/Editors/LinkEditor'
editorOptions:
linkTypes:
'Sitegeist.Archaeopteryx:Node':
startingPoint: '/sites/vendor-site/node-40up2e13w4fd9' # Default: current site node
baseNodeType: 'Vendor.Site' # default: Neos.Neos:Document
loadingDepth: 8 # default: 4
Asset
The Asset
Link Type handles links to files from the Media Module. The editor will offer you a media browser from which you can select any asset from within your site.
Mail To
The Mail To
Link Type handles e-mail links, so links that start with mailto:
. Links with the mailto:
protocol allow not only to specify a recipient, but also to configure a subject, a message body, carbon copy (CC) recipients and blind carbon copy (BCC) recipients for the outgoing e-mail.
The editor for the Mail To
Link Type will offer all of those fields. Each field can be deactivated via configuration.
The Mail To
Link Type can be configured as follows:
RTE Configuration:
'Vendor.Site:MyAwesomeNodeTypeWithSomeRichText':
# ...
properties:
text:
type: string
ui:
inlineEditable: true
inline:
editorOptions:
# ..
linking:
'Sitegeist.Archaeopteryx':
linkTypes:
'Sitegeist.Archaeopteryx:MailTo':
enabledFields:
subject: true
cc: true
bcc: true
body: true
Inspector Editor Configuration:
'Vendor.Site:MyAwesomeNodeTypeWithALinkProperty':
# ...
properties:
link:
type: string
ui:
inspector:
# ...
editor: 'Sitegeist.Archaeopteryx/Inspector/Editors/LinkEditor'
editorOptions:
linkTypes:
'Sitegeist.Archaeopteryx:MailTo':
enabledFields:
subject: true
cc: true
bcc: true
body: true
Link Options
In RTE context, Sitegeist.Archaeopteryx allows you to set some additional link options. These are:
-
Anchor: This will add a string to the hash-section of the URL (the part after
#
) -
Title: This will set the
title
attribute of the resulting<a>
-Tag -
Open in new window: This will set the
target
attribute of the resulting<a>
-Tag to_blank
-
rel="nofollow": This will set the
rel
attribute of the resulting<a>
-Tag tonofollow
Not all Link Types support all of these options however. Here's an overview of what Link Type supports which options:
Link Type | Supported Link Options |
---|---|
Web | Anchor, Title, Open in new window, rel="nofollow"
|
Document | Anchor, Title, Open in new window, rel="nofollow"
|
Asset | Title, Open in new window, rel="nofollow"
|
Mail To | - none - |
To enable or disable certain Link Options generally, you can use the linking
section of your RTE configuration:
'Vendor.Site:MyAwesomeNodeTypeWithSomeRichText':
# ...
properties:
text:
type: string
ui:
inlineEditable: true
inline:
editorOptions:
# ..
linking:
anchor: true
title: true
relNofollow: true
targetBlank: true
Contribution
We will gladly accept contributions. Please send us pull requests.
LICENSE
see LICENSE