syncfusion-blazor-smart-paste

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Syncfusion Blazor Smart Paste Button

Syncfusion Blazor Smart Paste Button

The Syncfusion Blazor Smart Paste Button uses AI to intelligently read clipboard text and populate form fields automatically, eliminating manual data entry.
Syncfusion Blazor Smart Paste Button 借助AI技术智能读取剪贴板文本并自动填充表单字段,省去手动输入数据的步骤。

When to Use

适用场景

Use this skill when you need to:
  • Add the Smart Paste Button to a Blazor form for AI-powered clipboard-to-field population
  • Configure an AI backend (OpenAI, Azure OpenAI, Ollama, or custom)
  • Add
    [SmartPasteField]
    annotations to fine-tune field mapping
  • Customize button appearance, content, and behavior
  • Integrate a custom
    IChatInferenceService
    implementation
  • Troubleshoot Smart Paste integration or AI connectivity issues
在以下场景中可使用该工具:
  • 为Blazor表单添加Smart Paste Button,实现AI驱动的剪贴板转字段填充功能
  • 配置AI后端(OpenAI、Azure OpenAI、Ollama或自定义后端)
  • 添加
    [SmartPasteField]
    注解以优化字段映射
  • 自定义按钮的外观、内容与行为
  • 集成自定义
    IChatInferenceService
    实现
  • 排查Smart Paste集成或AI连接相关的故障

Prerequisites

前置条件

  • .NET SDK 8.0 or later
  • Visual Studio 2022 (17.0+) or Visual Studio Code
  • Active OpenAI, Azure OpenAI, or Ollama account (or a custom AI backend)
  • Basic knowledge of Blazor Web App (Server render mode)
  • .NET SDK 8.0 或更高版本
  • Visual Studio 2022(17.0及以上)或Visual Studio Code
  • 有效的OpenAIAzure OpenAIOllama账户(或自定义AI后端)
  • 具备Blazor Web App(Server渲染模式)的基础知识

Quick Setup

快速设置

Follow these steps in order:
按以下步骤依次操作:

1. Initial Setup and NuGet Installation

1. 初始设置与NuGet安装

Start with getting-started.md to:
  • Create a new Blazor Web App Server
  • Install Syncfusion NuGet packages
  • Register Syncfusion Blazor services
  • Add necessary namespaces
参考getting-started.md完成:
  • 创建新的Blazor Web App Server项目
  • 安装Syncfusion NuGet包
  • 注册Syncfusion Blazor服务
  • 添加所需的命名空间

2. Configure AI Service

2. 配置AI服务

Proceed to ai-service-configuration.md to:
  • Choose your AI provider (OpenAI, Azure OpenAI, or Ollama)
  • Install AI service-specific NuGet packages
  • Configure your AI backend in
    Program.cs
  • Add theme stylesheets and script resources
参考ai-service-configuration.md完成:
  • 选择AI提供商(OpenAI、Azure OpenAI或Ollama)
  • 安装AI服务专属的NuGet包
  • Program.cs
    中配置AI后端
  • 添加主题样式表与脚本资源

3. Implement and Customize

3. 实现与自定义

Complete with implementation-and-customization.md to:
  • Add the Smart Paste Button component to your form
  • Run and test the application
  • Add custom field annotations
  • Customize button appearance
  • Integrate custom AI services
  • Troubleshoot common issues
参考implementation-and-customization.md完成:
  • 为表单添加Smart Paste Button组件
  • 运行并测试应用程序
  • 添加自定义字段注解
  • 自定义按钮外观
  • 集成自定义AI服务
  • 排查常见问题

Key Features

核心功能

FeatureDetails
AI-Powered Form FillingReads clipboard text and maps data to form fields automatically
Multiple AI BackendsOpenAI, Azure OpenAI, Ollama, and custom
IChatInferenceService
Field Annotations
[SmartPasteField]
attribute for precise field descriptions
Easy IntegrationSingle NuGet package +
AddSyncfusionSmartPaste()
service call
Customizable UIInherits all
SfButton
properties — icons, content, CSS classes
功能详情
AI驱动的表单填充读取剪贴板文本并自动将数据映射到表单字段
多AI后端支持支持OpenAI、Azure OpenAI、Ollama及自定义
IChatInferenceService
字段注解使用
[SmartPasteField]
属性实现精准的字段描述
轻松集成只需单个NuGet包 +
AddSyncfusionSmartPaste()
服务调用
可自定义UI继承
SfButton
的所有属性——图标、内容、CSS类

NuGet Packages

NuGet包

  • Syncfusion.Blazor.SmartComponents
    (v28.1.33+)
  • Syncfusion.Blazor.Themes
  • AI provider package — see ai-service-configuration.md
  • Syncfusion.Blazor.SmartComponents
    (v28.1.33+)
  • Syncfusion.Blazor.Themes
  • AI提供商包——详见ai-service-configuration.md

Reference Documents

参考文档

DocumentPurpose
getting-started.mdProject creation, NuGet installation, service registration
ai-service-configuration.mdAI provider setup (OpenAI, Azure OpenAI, Ollama)
implementation-and-customization.mdComponent usage, field annotations, customization, troubleshooting
文档用途
getting-started.md项目创建、NuGet安装、服务注册
ai-service-configuration.mdAI提供商设置(OpenAI、Azure OpenAI、Ollama)
implementation-and-customization.md组件使用、字段注解、自定义、故障排查