How cleanup internal links?

is it by default, or do I a have to adjust some elementary preferences somewhere?

  • If I use internal links, set in with the Editor-Button «insert-link» (#1) there are two unnecessary Anchor-Tag Attributes «data-gentics-aloha-repository» and «data-gentics-aloha-object-id» in FrontendSourceCode.
  • If I use external links, set in with the same button, the Anchor-Tag is clean:
<a target="_blank" href="">from</a>

Is it possible to define somewhere in AlohaEditor-Settings to clean per default the links, so the Anchor for internal-links will also without the two attributes in FrontEndSourceCode?
Maybe there is a solution in Neos-UI for each link separately, that I overlooked?
Or is some WorkAround practicable to suppress this behavior with something like:

<f:if condition="{neos:rendering.inBackend()}"></f:if>

Thank you for help

No there’s no built in way to get rid of those.

However you can write a TypoScript processor that strips those tags and add that to inline editable properties.

A theoretical example:

prototype(TYPO3.Neos:Content).@process.stripAlohaTags = ${String.pregReplace('/regExMatchingAlohaTags', '')}

And then only apply it when not logged in.

Thanks again Aske,
I guessed, I could solve it with pregReplace. But was hoping there would be an built-in solution.
Your input gave me safty not to overlook some built-in-solution and the theoretical example pointed out the direction.
To be honest, I can’t find a working solution with your .@process direct and applying, when not logged in.
Hope, I don’t take a sledgehammer to crack a nut (-if yes, suggestions are very welcome!): Otherwise my workaround is doing the job in real-live and maybe someone can use it as a model:


# overwrite the default Content-Value:
#In FrontEnd: delete unnecessary tags and values from aloha-editor; In Backend: no change
    content = TYPO3.TypoScript:Value
    content.stringValue = TYPO3.TypoScript:Case {
        renderInBackend {
            condition = ${node.context.inBackend ? TRUE : FALSE}
            renderer = ${value}
        renderInFrontend {
            condition = ${true}
            renderer = ${String.pregReplace(value, '/(data-gentics-aloha-object-id|data-gentics-aloha-repository)="[^"]+"/', '')}
    content.@process.1 = ${this.stringValue}

Why so complicated?

Untested, but:

prototype(TYPO3.Neos:Content) {
    @process.removeAlohaAttributesInFrontend = ${node.context.inBackend ? value : String.pregReplace(value, '/(data-gentics-aloha-object-id|data-gentics-aloha-repository)="[^"]+"/', '')}
1 Like

Maybe, because I lack the experience :smirk:, have the @process-possibilities not really understood and problem to generate practical and elegant solutions from theoretical information :anguished:.[quote=“christianm, post:4, topic:1173”]

TESTED! It works fine.

Thank you for clean and direct solution. I learned a lot of.