import React from "react"; import { FormField, FormItem, FormLabel, FormControl, FormMessage, FormDescription, } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@/components/ui/select"; import { Switch } from "@/components/ui/switch"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Textarea } from "@/components/ui/textarea"; import { X } from "lucide-react"; import { CampaignActionFieldsProps } from "@/lib/types"; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "@/components/ui/tooltip"; import DatePicker from "react-datepicker"; import "react-datepicker/dist/react-datepicker.css"; export function CampaignActionFields({ form, index, lists, templates, }: CampaignActionFieldsProps) { const placeholderTemplate = `
Read the full post at: {{ .Post.Title }}
Published on: {{ .Post.PublishedAt }}
`; return (The main content of your campaign. Use the format specified in the Content Type field.
Available placeholders:
{"{{ .Post.Title }}"} - The title of the post
{"{{ .Post.FeatureImage }}"} - URL of the feature
image
{"{{ .Post.CustomExcerpt }}"} - The custom
excerpt of the post
{"{{ .Post.Html }}"} - The full HTML content of
the post
{"{{ .Post.Slug }}"} - The URL slug of the post
{"{{ .Post.PublishedAt }}"} - The publication
date of the post
Click to insert a template example using all available placeholders