forked from neos/neos-development-collection
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUGFIX: Neos.NodeTypes:Text prototype is now a ContentComponent
The NodeType fusion renderer is now pure fusion, the behavior including attributes is kept. Relates: neos#4537 Relates: neos#4705
- Loading branch information
Showing
2 changed files
with
21 additions
and
8 deletions.
There are no files selected for viewing
25 changes: 21 additions & 4 deletions
25
Neos.NodeTypes/Resources/Private/Fusion/Content/Text.fusion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,22 @@ | ||
prototype(Neos.NodeTypes:Text) < prototype(Neos.Neos:Content) { | ||
templatePath = 'resource://Neos.NodeTypes/Private/Templates/NodeTypes/Text.html' | ||
text = ${q(node).property("text")} | ||
[email protected] = Neos.Neos:ConvertUris | ||
prototype(Neos.NodeTypes:Text) < prototype(Neos.Neos:ContentComponent) { | ||
text = Neos.Neos:Editable { | ||
property = 'text' | ||
} | ||
|
||
attributes = Neos.Fusion:DataStructure | ||
attributes.class = '' | ||
# The following is used to automatically append a class attribute that reflects the underlying node type of a Fusion object, | ||
# for example "neos-nodetypes-form", "neos-nodetypes-headline", "neos-nodetypes-html", "neos-nodetypes-image", "neos-nodetypes-menu" and "neos-nodetypes-text" | ||
# You can disable the following line with: | ||
# prototype(Neos.NodeTypes:Text) { | ||
# [email protected] > | ||
# } | ||
# in your site's Fusion if you don't need that behavior. | ||
[email protected] = ${Array.push(value, String.toLowerCase(String.pregReplace(node.nodeTypeName.value, '/[[:^alnum:]]/', '-')))} | ||
|
||
renderer = afx` | ||
<div {...props.attributes}> | ||
{props.text} | ||
</div> | ||
` | ||
} |
4 changes: 0 additions & 4 deletions
4
Neos.NodeTypes/Resources/Private/Templates/NodeTypes/Text.html
This file was deleted.
Oops, something went wrong.