neos / form-builder

Flow Form Framework integration into Neos CMS
GNU General Public License v3.0
18 stars 30 forks source link

FEATURE: CKE5 placeholder insert plugin #46

Closed dimaip closed 4 years ago

dimaip commented 5 years ago

Requires: https://github.com/neos/neos-ui/pull/2546

Adds a dropdown to CKE5 that allows you to insert Fluid placeholders for elements configured in the current form. It takes either formElement.properties.identifier or formElement.identifier as the placeholder value.

Sample config to enable this feature:

'Neos.Form.Builder:ConfirmationFinisher':
  properties:
    'message':
      ui:
        inspector:
          editor: 'Neos.Neos/Inspector/Editors/RichTextEditor'
          editorOptions:
            formatting:
              placeholderInsert: true
              strong: true
              em: true

image (2)

lorenzulrich commented 5 years ago

We need to rethink if and when to add this to Form Builder:

lorenzulrich commented 5 years ago

@dimaip just pointed out that this will not break anything even in older versions because it only works if the new UI is enabled and the UI has a RichTextEditor. Therefore, we could merge this without any drawbacks.

paavo commented 4 years ago

Thanks very much @dimaip for this awesome Feature. Is there any hint, how to make this work with the Neos.Form.Builder:EmailFinisher too? Looks like the "Frontend Part" works well, but the Values are not available when sending the E-Mail 😢

The "missing Property Selector" is still a reason, most of our Editors are not able to create their own Forms. Editors are not able to edit HTML in the ConfirmationFinisher / EmailFinisher. If this works, im pretty sure our Editors would be very happy 🎉

dimaip commented 4 years ago

Ohh @paavo sorry I totally forgot everything I did for this feature, so can't answer it from top of my head. Maybe somebody who actually uses this feature could help? @lorenzulrich? @bwaidelich?

bwaidelich commented 4 years ago

Maybe somebody who actually uses this feature could help?

I don't use this feature to be honest, but I tried to help in the #guild-form-builder channel: https://neos-project.slack.com/archives/CH86S151D

TL;DR This change prepares the RichTextEditor for Confirmation and EmailFinisher but the latter expects form value placeholders in the form formValues.* so that can't work. https://github.com/neos/form/pull/122 solves this by making the prefix optional..

BTW: The prefix was there to prevent naming conflicts with options for the finisher. An alternative solution might be to encourage the same prefix in the ConfirmationFinisher and to extend the RichTextEditor by some "placeholderPrefix" option