syncfusion-aspnetcore-smart-textarea
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSyncfusion ASP.NET Core Smart TextArea
Syncfusion ASP.NET Core Smart TextArea
Overview
概述
The Smart TextArea is an intelligent, AI-powered text input control that provides real-time sentence completion and text suggestions using semantic understanding. This skill guides you through implementing Smart TextArea functionality in ASP.NET Core applications with support for multiple AI providers, customizable suggestion modes, and extensible inference backends.
The Smart TextArea provides:
- AI-Powered Completions: Intelligent sentence and text suggestions using OpenAI, Azure OpenAI, Ollama, or custom backends
- Multiple Suggestion Modes: Inline pop-up or integrated display options for AI suggestions
- User Role Configuration: Role-based suggestion behavior (student, writer, developer, etc.)
- Custom Phrases: Predefined phrase suggestions based on user context and preferences
- Full TextArea Features: Floating labels, validation, RTL support, accessibility compliance
- Tag Helper Support: Native ASP.NET Core TagHelper integration for Razor Pages and MVC
- Event System: Suggestion selection, value change, focus, and blur events
Smart TextArea是一款基于AI的智能文本输入控件,它利用语义理解提供实时句子补全和文本建议。本技能将指导你在ASP.NET Core应用中实现Smart TextArea功能,支持多种AI提供商、可自定义的建议模式以及可扩展的推理后端。
Smart TextArea具备以下特性:
- AI驱动的补全功能: 借助OpenAI、Azure OpenAI、Ollama或自定义后端提供智能句子和文本建议
- 多种建议模式: 支持内联弹出或集成式的AI建议显示选项
- 用户角色配置: 基于角色(学生、作家、开发者等)的建议行为设置
- 自定义短语: 根据用户上下文和偏好提供预定义短语建议
- 完整的文本区域功能: 浮动标签、验证、RTL支持、无障碍合规性
- Tag Helper支持: 与ASP.NET Core TagHelper原生集成,适用于Razor Pages和MVC
- 事件系统: 建议选择、值变更、聚焦和失焦事件
When to Use This Skill
何时使用本技能
Use this skill when you need to:
- Implement AI-powered text completion in ASP.NET Core applications
- Configure OpenAI or Azure OpenAI for Smart TextArea functionality
- Set up Ollama or custom AI inference services
- Customize suggestion display modes (inline vs popup)
- Configure user roles and custom phrases for context-aware suggestions
- Implement custom inference backends for proprietary AI models
- Add intelligent text authoring features to multi-line text inputs
- Integrate Smart TextArea into forms and content editors
当你需要以下功能时,可使用本技能:
- 在ASP.NET Core应用中实现AI驱动的文本补全
- 为Smart TextArea功能配置OpenAI或Azure OpenAI
- 设置Ollama或自定义AI推理服务
- 自定义建议显示模式(内联 vs 弹出)
- 配置用户角色和自定义短语以提供上下文感知的建议
- 为专有AI模型实现自定义推理后端
- 为多行文本输入添加智能文本创作功能
- 将Smart TextArea集成到表单和内容编辑器中
Component Overview
组件概述
Key Features:
- Real-time AI sentence completion suggestions
- Inline and popup suggestion display modes
- Role-based suggestion intelligence (Student, Writer, Developer, Custom)
- Predefined custom phrases and snippets
- Full TextArea control feature inheritance
- Support for multiple languages and RTL layouts
- Event-driven suggestion handling
- Accessibility and keyboard navigation support
Common Properties:
- - Default hint text
Placeholder - - Current textarea content
Value - /
OpenAIKey/AzureEndpoint- AI service configurationOllamaUrl - - 'Inline' or 'Popup' suggestion display
SuggestionMode - - Role context (Student, Writer, Developer, Custom)
UserRole - - Custom phrase suggestions
UserPhrases - - Event when suggestion is applied
ActionComplete - - Event when content changes
Change - /
Rows- Textarea dimensionsCols - - Read-only state
ReadOnly
核心特性:
- 实时AI句子补全建议
- 内联和弹出式建议显示模式
- 基于角色的建议智能(学生、作家、开发者、自定义)
- 预定义自定义短语和代码片段
- 继承完整的文本区域控件特性
- 支持多种语言和RTL布局
- 事件驱动的建议处理
- 无障碍和键盘导航支持
常用属性:
- - 默认提示文本
Placeholder - - 当前文本区域内容
Value - /
OpenAIKey/AzureEndpoint- AI服务配置OllamaUrl - - 建议显示模式:'Inline'(内联)或 'Popup'(弹出)
SuggestionMode - - 角色上下文(学生、作家、开发者、自定义)
UserRole - - 自定义短语建议
UserPhrases - - 建议应用完成时触发的事件
ActionComplete - - 内容变更时触发的事件
Change - /
Rows- 文本区域尺寸Cols - - 只读状态
ReadOnly
Documentation Navigation
文档导航
Getting Started
快速入门
📄 Read: references/getting-started.md
- Prerequisites and system requirements
- Installing Syncfusion.EJ2.AspNet.Core NuGet package
- Configuring AI services (OpenAI, Azure OpenAI, Ollama)
- Project setup with Razor Pages and MVC
- Tag helper registration and configuration
- CDN stylesheet and script setup
- Creating your first Smart TextArea implementation
- Basic form integration with AI completions
📄 阅读: references/getting-started.md
- 前提条件和系统要求
- 安装Syncfusion.EJ2.AspNet.Core NuGet包
- 配置AI服务(OpenAI、Azure OpenAI、Ollama)
- Razor Pages和MVC的项目设置
- Tag Helper注册和配置
- CDN样式表和脚本设置
- 创建你的第一个Smart TextArea实现
- 基础表单与AI补全功能的集成
Features and Capabilities
特性与功能
📄 Read: references/features.md
- Core Smart TextArea features and properties
- Standard TextArea feature inheritance (floating labels, validation)
- User role configuration (Student, Writer, Developer, Custom)
- Suggestion display and interaction patterns
- Event handling and callbacks
- Multi-language and RTL support
- Accessibility features and keyboard navigation
- Form submission and value management
📄 阅读: references/features.md
- Smart TextArea核心特性和属性
- 标准文本区域特性继承(浮动标签、验证)
- 用户角色配置(学生、作家、开发者、自定义)
- 建议显示和交互模式
- 事件处理和回调
- 多语言和RTL支持
- 无障碍特性和键盘导航
- 表单提交和值管理
Customization
自定义配置
📄 Read: references/customization.md
- Suggestion display mode configuration (inline vs popup)
- User role and context configuration
- Custom phrases and snippet configuration
- TextArea appearance and styling options
- Placeholder text and label customization
- Size and dimension configuration
- Event handling and completion callbacks
- Theme and CSS class customization
📄 阅读: references/customization.md
- 建议显示模式配置(内联 vs 弹出)
- 用户角色和上下文配置
- 自定义短语和代码片段配置
- 文本区域外观和样式选项
- 占位符文本和标签自定义
- 尺寸和维度配置
- 事件处理和补全回调
- 主题和CSS类自定义
Custom Inference Backend
自定义推理后端
📄 Read: custom-inference-backend
- IChatInferenceService interface implementation
- Custom AI provider integration
- Service registration in dependency injection
- Request/response format specifications
- Expected completion format and response structure
- Handling complex inference scenarios
- Testing and debugging custom backends
- Performance optimization strategies
📄 阅读: custom-inference-backend
- IChatInferenceService接口实现
- 自定义AI提供商集成
- 依赖注入中的服务注册
- 请求/响应格式规范
- 预期补全格式和响应结构
- 复杂推理场景处理
- 自定义后端的测试与调试
- 性能优化策略