Edit the initial rich-text value via the View JSON drawer.
@@ -934,22 +938,32 @@ function ActionIdField({
/**
* Shared placeholder field used by every element that supports
* `placeholder` (i.e. anything implementing `Placeholdable`).
+ *
+ * `example` is shown as the input's own `placeholder` attribute so the
+ * user gets a per-element-type hint about what to type. The element's
+ * factory in `default-blocks.ts` intentionally ships without a default
+ * `placeholder.text` so this hint and the live preview don't render the
+ * same string twice when the editor first opens.
+ *
* @param props - props
* @param props.element - the element being edited
* @param props.onChange - called with the updated element
+ * @param props.example - greyed-out hint shown in the editor input (not
+ * stored on the block); defaults to a generic suggestion
* @returns the rendered field
*/
function PlaceholderField<
T extends {
placeholder?: { type: 'plain_text'; text: string; emoji?: boolean };
}
->({ element, onChange }: { element: T; onChange: (next: T) => void }) {
+>({ element, onChange, example = 'e.g. Type a hint' }: { element: T; onChange: (next: T) => void; example?: string }) {
return (
onChange({
...element,