@covalent/text-editor

中文文档
11.23.0发布于 2026/10/02MITTypeScriptES Module近 30 天下载 2539

Teradata UI Platform Text Editor Module

原始使用文档
文档目录5 节
  1. TdTextEditorComponent: td-text-editor
  2. API Summary
  3. Installation
  4. Setup
  5. Usage

TdTextEditorComponent: td-text-editor

<td-text-editor> element generates an easymde markdown editor.

API Summary

Inputs

Properties

  • isPreviewActive?: function()
    • is the Preview Active. Returns boolean
  • isSideBySideActive?: function()
    • is the Side By Side Active. Returns boolean
  • isFullscreenActive?: function()
    • is Full Screen Active. Returns boolean
  • clearAutosavedValue?: function()
    • clears Auto Saved Value. Returns void
  • toTextArea?: function()
    • reverts to the Initial textarea. Returns void
  • easyMDE?: function()
    • getter function for the underlying easyMDE Object. Returns EasyMDE

Installation

This component can be installed as npm package.

npm install @covalent/text-editor

Setup

Import the CovalentTextEditorModule in your NgModule:

import { CovalentTextEditorModule } from '@covalent/text-editor';
@NgModule({
  imports: [
    CovalentTextEditorModule,
    ...
  ],
  ...
})
export class MyModule {}

Usage

<td-text-editor [value]="Some Text" [options]="options"></td-text-editor>
class MyComponent {
  options: any = {
    lineWrapping: true,
    toolbar: false,
    ...
  };
}

版本与发布记录

@covalent/text-editor 共发布 401 个版本,首次发布于 2017/08/10;过去 12 个月发布了 74 个版本。

版本发布日期距今
11.23.0latest2026/10/021 个月前
11.22.12026/09/102 个月前
11.22.02026/09/102 个月前
11.21.02026/09/092 个月前
10.5.82026/07/293 个月前
11.20.12026/07/293 个月前

其他发布通道:next → 11.5.2-beta.1。

关于 @covalent/text-editor 的常见问题

@covalent/text-editor 是什么?

Teradata UI Platform Text Editor Module

如何安装 @covalent/text-editor?

在项目目录运行 npm install @covalent/text-editor,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:easymde(^2.18.0)、@angular/core(20.x.x)、@angular/common(20.x.x)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@covalent/text-editor 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@covalent/text-editor 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@covalent/text-editor 可以商用吗?

@covalent/text-editor 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@covalent/text-editor 的下载量有多少?

根据 npm 官方下载统计,@covalent/text-editor 在 2026/10/11 – 2026/11/09 这 30 天内被下载 2,539 次,日均约 85 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@covalent/text-editor 还在维护吗?

最新版本 11.23.0 发布于 2026/10/02(1 个月前);至今共发布 401 个版本,其中过去 12 个月发布了 74 个;首次发布于 2017/08/10。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。