@contentstack/cli-cm-migrate-rte

中文文档
2.0.2发布于 2026/10/06MIT近 30 天下载 1万

Contentstack CLI plugin to migrate HTML RTE to JSON RTE

原始使用文档

Source of truth: cli-plugins — packages/contentstack-migrate-rte. Migrated from cli-cm-migrate-rte. See MIGRATE-RTE-MIGRATION.md.

@contentstack/cli-cm-migrate-rte

It is Contentstack’s CLI plugin to migrate rte. Using this command, you can copy existing value of HTML RTE into JSON RTE.

Usage

$ npm install -g @contentstack/cli-cm-migrate-rte
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-migrate-rte/2.0.1 darwin-arm64 node-v22.21.1
$ csdx --help [COMMAND]
USAGE
  $ csdx COMMAND
...

Commands

csdx cm:entries:migrate-html-rte

Migration script to migrate content from HTML RTE to JSON RTE

USAGE
  $ csdx cm:entries:migrate-html-rte [-c <value>] [-a <value>] [--stack-api-key <value>] [--content-type <value>]
    [--global-field] [-y] [--branch <value>] [--html-path <value> --json-path <value>] [--delay <value>] [--locale
    <value>] [--batch-limit <value>]

FLAGS
  -a, --alias=<value>          Enter the alias name. You must use either the --alias flag or the --stack-api-key flag.
  -c, --config-path=<value>    Specify the path where your config file is located.
  -y, --yes                    Avoids reconfirmation of your configuration.
      --batch-limit=<value>    [default: 50] Provide batch limit for updating entries (default: 50).
      --branch=<value>         The name of the branch to be used.
      --content-type=<value>   Specify the UID of the content type for which you want to migrate HTML RTE content.
      --delay=<value>          [default: 1000] To set the interval time between the migration of HTML RTE to JSON RTE in
                               subsequent entries of a content type. The default value is 1,000 milliseconds.
      --global-field           Checks whether the specified UID belongs to a content type or a global field. This flag
                               is set to false by default.
      --html-path=<value>      Enter the path to the HTML RTE whose content you want to migrate.
      --json-path=<value>      Enter the path to the JSON RTE to which you want to migrate the HTML RTE content.
      --locale=<value>         The locale from which entries will be migrated.
      --stack-api-key=<value>  API key of the source stack. You must use either the --stack-api-key flag or the --alias
                               flag.

DESCRIPTION
  Migration script to migrate content from HTML RTE to JSON RTE

EXAMPLES
  General Usage

  $ csdx cm:entries:migrate-html-rte --config-path path/to/config.json



  Using Flags

  $ csdx cm:entries:migrate-html-rte --alias alias --content-type content_type_uid --html-path html-path --json-path json-path



  Nested RTE

  $ csdx cm:entries:migrate-html-rte --alias alias --content-type content_type_uid --html-path modular_block_uid.block_uid.html_rte_uid --json-path modular_block_uid.block_uid.json_rte_uid



  $ csdx cm:entries:migrate-html-rte --alias alias --content-type content_type_uid --html-path group_uid.html_rte_uid --json-path group_uid.json_rte_uid



  Global Field

  $ csdx cm:entries:migrate-html-rte --alias alias --content-type global_field_uid --global-field --html-path html-path --json-path json-path

See code: src/commands/cm/entries/migrate-html-rte.js

版本与发布记录

@contentstack/cli-cm-migrate-rte 共发布 64 个版本,首次发布于 2021/07/16;过去 12 个月发布了 21 个版本。

版本发布日期距今
2.0.2latest2026/10/061 个月前
1.7.6v1-x2026/10/061 个月前
2.0.12026/09/151 个月前
1.7.52026/08/132 个月前
2.0.02026/08/122 个月前
1.7.42026/08/053 个月前

其他发布通道:beta → 2.0.0-beta.10,v1-x → 1.7.6。

关于 @contentstack/cli-cm-migrate-rte 的常见问题

@contentstack/cli-cm-migrate-rte 是什么?

Contentstack CLI plugin to migrate HTML RTE to JSON RTE

如何安装 @contentstack/cli-cm-migrate-rte?

在项目目录运行 npm install @contentstack/cli-cm-migrate-rte,或使用 pnpm add / yarn add / bun add。

@contentstack/cli-cm-migrate-rte 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/contentstack__cli-cm-migrate-rte 是否存在。

@contentstack/cli-cm-migrate-rte 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@contentstack/cli-cm-migrate-rte 可以商用吗?

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

@contentstack/cli-cm-migrate-rte 的下载量有多少?

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

@contentstack/cli-cm-migrate-rte 还在维护吗?

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