The following blueprint examples will add a toolbar icon to writer or textarea fields. When clicked, a dialog will open with a user prompt that can be answered by the AI model. If any text is selected, it is automatically appended to the user prompt.
Allow all default marks and only append the Copilot button to the toolbar:

fields:
text:
label: Text
type: writer
toolbar:
inline: false
marks:
# These are the default marks
- bold
- italic
- underline
- strike
- code
- "|"
- link
- email
- "|"
- clear
# Append the Copilot button to the toolbar
- "|"
- copilot
Of course, you can also disable all default buttons (either writer or textarea field) and display only the Copilot button:

fields:
text:
label: Text
type: textarea
buttons:
# These are the default buttons
# - headlines
# - "|"
# - bold
# - italic
# - code
# - "|"
# - link
# - email
# - file
# - "|"
# - ul
# - ol
# Append the Copilot button to the toolbar
- "|"
- copilot