|
1 | | -# cli-cm-migrate-rte |
| 1 | +# @contentstack/cli-cm-migrate-rte |
| 2 | + |
| 3 | +It is Contentstack’s CLI plugin to migrate rte. Using this command, you can copy existing value of HTML RTE into JSON RTE. |
| 4 | + |
| 5 | +<!-- toc --> |
| 6 | +* [@contentstack/cli-cm-migrate-rte](#contentstackcli-cm-migrate-rte) |
| 7 | +* [Usage](#usage) |
| 8 | +* [Commands](#commands) |
| 9 | +<!-- tocstop --> |
| 10 | + |
| 11 | +# Usage |
| 12 | + |
| 13 | +<!-- usage --> |
| 14 | +```sh-session |
| 15 | +$ npm install -g @contentstack/cli-cm-migrate-rte |
| 16 | +$ csdx COMMAND |
| 17 | +running command... |
| 18 | +$ csdx (--version) |
| 19 | +@contentstack/cli-cm-migrate-rte/2.0.0-beta darwin-arm64 node-v22.14.0 |
| 20 | +$ csdx --help [COMMAND] |
| 21 | +USAGE |
| 22 | + $ csdx COMMAND |
| 23 | +... |
| 24 | +``` |
| 25 | +<!-- usagestop --> |
| 26 | + |
| 27 | +# Commands |
| 28 | + |
| 29 | +<!-- commands --> |
| 30 | +* [`csdx cm:entries:migrate-html-rte`](#csdx-cmentriesmigrate-html-rte) |
| 31 | +* [`csdx cm:migrate-rte`](#csdx-cmmigrate-rte) |
| 32 | + |
| 33 | +## `csdx cm:entries:migrate-html-rte` |
| 34 | + |
| 35 | +Migration script to migrate content from HTML RTE to JSON RTE |
| 36 | + |
| 37 | +``` |
| 38 | +USAGE |
| 39 | + $ csdx cm:entries:migrate-html-rte [-c <value>] [-a <value>] [--stack-api-key <value>] [--content-type <value>] |
| 40 | + [--global-field] [-y] [--branch <value>] [--html-path <value> --json-path <value>] [--delay <value>] [--locale |
| 41 | + <value>] [--batch-limit <value>] |
| 42 | +
|
| 43 | +FLAGS |
| 44 | + -a, --alias=<value> Enter the alias name. You must use either the --alias flag or the --stack-api-key flag. |
| 45 | + -c, --config-path=<value> Specify the path where your config file is located. |
| 46 | + -y, --yes Avoids reconfirmation of your configuration. |
| 47 | + --batch-limit=<value> [default: 50] Provide batch limit for updating entries (default: 50). |
| 48 | + --branch=<value> The name of the branch to be used. |
| 49 | + --content-type=<value> Specify the UID of the content type for which you want to migrate HTML RTE content. |
| 50 | + --delay=<value> [default: 1000] To set the interval time between the migration of HTML RTE to JSON RTE in |
| 51 | + subsequent entries of a content type. The default value is 1,000 milliseconds. |
| 52 | + --global-field Checks whether the specified UID belongs to a content type or a global field. This flag |
| 53 | + is set to false by default. |
| 54 | + --html-path=<value> Enter the path to the HTML RTE whose content you want to migrate. |
| 55 | + --json-path=<value> Enter the path to the JSON RTE to which you want to migrate the HTML RTE content. |
| 56 | + --locale=<value> The locale from which entries will be migrated. |
| 57 | + --stack-api-key=<value> API key of the source stack. You must use either the --stack-api-key flag or the --alias |
| 58 | + flag. |
| 59 | +
|
| 60 | +DESCRIPTION |
| 61 | + Migration script to migrate content from HTML RTE to JSON RTE |
| 62 | +
|
| 63 | +ALIASES |
| 64 | + $ csdx cm:migrate-rte |
| 65 | +
|
| 66 | +EXAMPLES |
| 67 | + General Usage |
| 68 | +
|
| 69 | + $ csdx cm:entries:migrate-html-rte --config-path path/to/config.json |
| 70 | +
|
| 71 | +
|
| 72 | +
|
| 73 | + Using Flags |
| 74 | +
|
| 75 | + $ csdx cm:entries:migrate-html-rte --alias alias --content-type content_type_uid --html-path html-path --json-path json-path |
| 76 | +
|
| 77 | +
|
| 78 | +
|
| 79 | + Nested RTE |
| 80 | +
|
| 81 | + $ 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 |
| 82 | +
|
| 83 | +
|
| 84 | +
|
| 85 | + $ 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 |
| 86 | +
|
| 87 | +
|
| 88 | +
|
| 89 | + Global Field |
| 90 | +
|
| 91 | + $ csdx cm:entries:migrate-html-rte --alias alias --content-type global_field_uid --global-field --html-path html-path --json-path json-path |
| 92 | +``` |
| 93 | + |
| 94 | +_See code: [src/commands/cm/entries/migrate-html-rte.js](https://github.com/contentstack/cli-cm-migrate-rte/blob/main/src/commands/cm/entries/migrate-html-rte.js)_ |
| 95 | + |
| 96 | +## `csdx cm:migrate-rte` |
| 97 | + |
| 98 | +Migration script to migrate content from HTML RTE to JSON RTE |
| 99 | + |
| 100 | +``` |
| 101 | +USAGE |
| 102 | + $ csdx cm:migrate-rte [-c <value>] [-a <value>] [--stack-api-key <value>] [--content-type <value>] |
| 103 | + [--global-field] [-y] [--branch <value>] [--html-path <value> --json-path <value>] [--delay <value>] [--locale |
| 104 | + <value>] [--batch-limit <value>] |
| 105 | +
|
| 106 | +FLAGS |
| 107 | + -a, --alias=<value> Enter the alias name. You must use either the --alias flag or the --stack-api-key flag. |
| 108 | + -c, --config-path=<value> Specify the path where your config file is located. |
| 109 | + -y, --yes Avoids reconfirmation of your configuration. |
| 110 | + --batch-limit=<value> [default: 50] Provide batch limit for updating entries (default: 50). |
| 111 | + --branch=<value> The name of the branch to be used. |
| 112 | + --content-type=<value> Specify the UID of the content type for which you want to migrate HTML RTE content. |
| 113 | + --delay=<value> [default: 1000] To set the interval time between the migration of HTML RTE to JSON RTE in |
| 114 | + subsequent entries of a content type. The default value is 1,000 milliseconds. |
| 115 | + --global-field Checks whether the specified UID belongs to a content type or a global field. This flag |
| 116 | + is set to false by default. |
| 117 | + --html-path=<value> Enter the path to the HTML RTE whose content you want to migrate. |
| 118 | + --json-path=<value> Enter the path to the JSON RTE to which you want to migrate the HTML RTE content. |
| 119 | + --locale=<value> The locale from which entries will be migrated. |
| 120 | + --stack-api-key=<value> API key of the source stack. You must use either the --stack-api-key flag or the --alias |
| 121 | + flag. |
| 122 | +
|
| 123 | +DESCRIPTION |
| 124 | + Migration script to migrate content from HTML RTE to JSON RTE |
| 125 | +
|
| 126 | +ALIASES |
| 127 | + $ csdx cm:migrate-rte |
| 128 | +
|
| 129 | +EXAMPLES |
| 130 | + General Usage |
| 131 | +
|
| 132 | + $ csdx cm:entries:migrate-html-rte --config-path path/to/config.json |
| 133 | +
|
| 134 | +
|
| 135 | +
|
| 136 | + Using Flags |
| 137 | +
|
| 138 | + $ csdx cm:entries:migrate-html-rte --alias alias --content-type content_type_uid --html-path html-path --json-path json-path |
| 139 | +
|
| 140 | +
|
| 141 | +
|
| 142 | + Nested RTE |
| 143 | +
|
| 144 | + $ 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 |
| 145 | +
|
| 146 | +
|
| 147 | +
|
| 148 | + $ 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 |
| 149 | +
|
| 150 | +
|
| 151 | +
|
| 152 | + Global Field |
| 153 | +
|
| 154 | + $ csdx cm:entries:migrate-html-rte --alias alias --content-type global_field_uid --global-field --html-path html-path --json-path json-path |
| 155 | +``` |
| 156 | +<!-- commandsstop --> |
0 commit comments