contentstack_utils 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/codeql-analysis.yml +68 -0
- data/.github/workflows/jira.yml +28 -0
- data/.github/workflows/release-gem.yml +31 -0
- data/.github/workflows/sast-scan.yml +11 -0
- data/.github/workflows/sca-scan.yml +15 -0
- data/.github/workflows/secrets-scan.yml +11 -0
- data/.gitignore +10 -10
- data/.yardopts +3 -3
- data/CHANGELOG.md +18 -12
- data/CODEOWNERS +1 -1
- data/Gemfile +4 -4
- data/Gemfile.lock +81 -76
- data/LICENSE +20 -20
- data/README.md +96 -96
- data/Rakefile +32 -32
- data/SECURITY.md +27 -27
- data/contentstack_utils.gemspec +31 -31
- data/lib/contentstack_utils/interface/renderable.rb +8 -8
- data/lib/contentstack_utils/model/metadata.rb +68 -68
- data/lib/contentstack_utils/model/options.rb +115 -113
- data/lib/contentstack_utils/support/helper.rb +2 -2
- data/lib/contentstack_utils/utils.rb +163 -163
- data/lib/contentstack_utils/version.rb +2 -2
- data/lib/contentstack_utils.rb +3 -3
- data/spec/lib/model/metadata_spec.rb +94 -94
- data/spec/lib/model/option_spec.rb +316 -309
- data/spec/lib/utils_spec.rb +642 -642
- data/spec/mock/constant_render_options.rb +15 -15
- data/spec/mock/custom_render_option.rb +23 -23
- data/spec/mock/json_to_html_mock.rb +146 -146
- data/spec/spec_helper.rb +8 -8
- data/spec/support/constant.rb +616 -616
- data/spec/support/xml_parse.rb +30 -30
- metadata +17 -11
data/spec/support/constant.rb
CHANGED
@@ -1,617 +1,617 @@
|
|
1
|
-
NO_HTML = 'non html string'
|
2
|
-
SIMPLE_HTML = '<h1>Hello</h1> World'
|
3
|
-
|
4
|
-
ENTRY_BLOCK = '<figure class="embedded-entry block-entry" data-redactor-type="embed" type="entry" data-sys-entry-uid="entry_uid_7" data-sys-entry-locale="en-us" data-sys-content-type-uid="article" sys-style-type="block">{{title}}</figure>'
|
5
|
-
ENTRY_INLINE = '<figure class="embedded-entry inline-entry" data-redactor-type="embed" type="entry" data-sys-entry-uid="entry_uid_7" data-sys-entry-locale="en-us" data-sys-content-type-uid="article" style="display:inline;" sys-style-type="inline">{{title}}
|
6
|
-
</figure>'
|
7
|
-
ENTRY_LINK ='<figure class="embedded-entry link-entry" type="entry" data-sys-entry-locale="en-us" data-sys-entry-uid="entry_uid_7" href="/this-is-unique-title" data-sys-content-type-uid="article" style="display:inline;" sys-style-type="link">{{title}}
|
8
|
-
</figure>'
|
9
|
-
|
10
|
-
ASSET_DISPLAY = '<figure class="embedded-asset" alt="{{object.title}}" data-redactor-type="embed" data-sys-asset-filelink="{{url}}" data-sys-asset-filename="Cuvier-67_Autruche_d_Afrique.jpg" data-sys-asset-contenttype="image/png" type="asset" data-sys-asset-uid="entry_uid_7" style="display:inline;" sys-style-type="display">
|
11
|
-
</figure>'
|
12
|
-
ASSET_DOWNLOAD = '<figure class="embedded-asset" data-redactor-type="embed" data-sys-asset-filelink="{{url}}" data-sys-asset-uid="entry_uid_8" data-sys-asset-filename="iphone-mockup.png" data-sys-asset-contenttype="image/png" data-sys-asset-alt="iphone-mockup.png" data-sys-asset-caption="Caption" data-sys-asset-link="{{link}}" data-sys-asset-position="center" data-sys-asset-isnewtab="true" type="asset" sys-style-type="download"></figure>'
|
13
|
-
|
14
|
-
ENTRY_CONTENT_BLANK = {
|
15
|
-
"uid"=> "uid",
|
16
|
-
"_content_type_uid"=> "content_type_uid",
|
17
|
-
}
|
18
|
-
|
19
|
-
ENTRY_CONTENT_URL = {
|
20
|
-
"uid"=> "uid",
|
21
|
-
"url"=> "url",
|
22
|
-
"_content_type_uid"=> "content_type_uid"
|
23
|
-
}
|
24
|
-
|
25
|
-
ASSET_CONTENT_URL = {
|
26
|
-
"uid"=> "uid",
|
27
|
-
"url"=> "url",
|
28
|
-
"title"=> "title",
|
29
|
-
"_content_type_uid"=> "content_type_uid"
|
30
|
-
}
|
31
|
-
|
32
|
-
ENTRY_CONTENT_TITLE = {
|
33
|
-
"uid"=> "uid",
|
34
|
-
"title"=> "title",
|
35
|
-
"_content_type_uid"=> "content_type_uid"
|
36
|
-
}
|
37
|
-
|
38
|
-
ENTRY_CONTENT_TITLE_URL = {
|
39
|
-
"uid"=> "uid",
|
40
|
-
"url"=> "url",
|
41
|
-
"title"=> "title",
|
42
|
-
"_content_type_uid"=> "content_type_uid"
|
43
|
-
}
|
44
|
-
|
45
|
-
ENTRY_EMBEDDED_ASSET = {
|
46
|
-
"title"=> 'one',
|
47
|
-
"url"=> '/one',
|
48
|
-
"rich_text_editor"=> '<p></p><figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.asset/v3/dummy.pdf" data-sys-asset-uid="asset_uid_1" data-sys-asset-filename="dummy.pdf" data-sys-asset-contenttype="application/pdf" type="asset" sys-style-type="display"></figure>\n<img data-image="236uaymkloww" src="https://contentstack.image/v3/html5.png" data-sys-asset-uid="entry_uid_9" alt="html5.png">\n<p></p>\n<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/svg-logo-text.png" data-sys-asset-uid="entry_uid_5" data-sys-asset-filename="svg-logo-text.png" data-sys-asset-contenttype="image/png" type="asset" sys-style-type="display"></figure>',
|
49
|
-
"locale"=> 'en-us',
|
50
|
-
"uid"=> 'entry_uid_4',
|
51
|
-
"created_by"=> 'created_at_date',
|
52
|
-
"updated_by"=> 'created_at_date',
|
53
|
-
"created_at"=> '2020-08-13T06:18:18.989Z',
|
54
|
-
"updated_at"=> '2020-08-31T06:06:31.258Z',
|
55
|
-
"markdown"=> '',
|
56
|
-
"_embedded_items"=> {
|
57
|
-
"rich_text_editor"=> [
|
58
|
-
{
|
59
|
-
"_content_type_uid"=> 'sys_assets',
|
60
|
-
"uid"=> 'asset_uid_1',
|
61
|
-
"created_at"=> '2020-08-19T09:13:32.785Z',
|
62
|
-
"updated_at"=> '2020-08-19T09:13:32.785Z',
|
63
|
-
"created_by"=> 'created_at_date',
|
64
|
-
"updated_by"=> 'created_at_date',
|
65
|
-
"content_type"=> 'application/pdf',
|
66
|
-
"file_size"=> '13264',
|
67
|
-
"filename"=> 'dummy.pdf',
|
68
|
-
"url"=> '/v3/dummy.pdf',
|
69
|
-
"_version"=> 1,
|
70
|
-
"title"=> 'dummy.pdf'
|
71
|
-
},
|
72
|
-
{
|
73
|
-
"_content_type_uid"=> 'sys_assets',
|
74
|
-
"uid"=> 'entry_uid_5',
|
75
|
-
"created_at"=> '2020-08-19T09:13:05.864Z',
|
76
|
-
"updated_at"=> '2020-09-10T09:35:28.393Z',
|
77
|
-
"created_by"=> 'created_at_date',
|
78
|
-
"updated_by"=> 'created_at_date',
|
79
|
-
"content_type"=> 'image/png',
|
80
|
-
"file_size"=> '36743',
|
81
|
-
"filename"=> 'svg-logo-text.png',
|
82
|
-
"url"=> '/v3/svg-logo-text.png',
|
83
|
-
"_version"=> 7,
|
84
|
-
"title"=> 'svg-logo-text.png',
|
85
|
-
"description"=> '',
|
86
|
-
}
|
87
|
-
]
|
88
|
-
}
|
89
|
-
}
|
90
|
-
|
91
|
-
ENTRY_ASSET_EMBED_BLANK = {
|
92
|
-
"title"=> 'one',
|
93
|
-
"url"=> '/one',
|
94
|
-
"rich_text_editor"=> '<p> </p><figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.asset/v3/dummy.pdf" data-sys-asset-uid="asset_uid_1" data-sys-asset-filename="dummy.pdf" data-sys-asset-contenttype="application/pdf" type="asset" sys-style-type="display"></figure>\n<img data-image="236uaymkloww" src="https://contentstack.image/v3/html5.png" data-sys-asset-uid="entry_uid_9" alt="html5.png">\n<p></p>\n<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/svg-logo-text.png" data-sys-asset-uid="entry_uid_5" data-sys-asset-filename="svg-logo-text.png" data-sys-asset-contenttype="image/png" type="asset" sys-style-type="display"></figure>',
|
95
|
-
"locale"=> 'en-us',
|
96
|
-
"uid"=> 'entry_uid_4',
|
97
|
-
"created_by"=> 'created_at_date',
|
98
|
-
"updated_by"=> 'created_at_date',
|
99
|
-
"created_at"=> '2020-08-13T06:18:18.989Z',
|
100
|
-
"updated_at"=> '2020-08-31T06:06:31.258Z',
|
101
|
-
"markdown"=> '',
|
102
|
-
}
|
103
|
-
|
104
|
-
ENTRY_EMBEDDED_ENTRIES = {
|
105
|
-
"title"=> 'entry and assets',
|
106
|
-
"url"=> '/entry-and-assets',
|
107
|
-
"rich_text_editor"=> '<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_3" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="embeddedrte" sys-style-type="block" type="entry"></figure>\n<p></p>\n<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/html5.png" data-sys-asset-uid="entry_uid_6" data-sys-asset-filename="svg-logo-text.png" data-sys-asset-contenttype="image/png" type="asset" sys-style-type="display"></figure>',
|
108
|
-
"locale"=> 'en-us',
|
109
|
-
"_in_progress"=> false,
|
110
|
-
"uid"=> 'entry_uid_4',
|
111
|
-
"rte"=> '<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_1" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="content_block" sys-style-type="block" type="entry"></figure>\n<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_2" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="embeddedrte" sys-style-type="inline" type="entry"></figure>\n<p></p>',
|
112
|
-
"_embedded_items"=> {
|
113
|
-
"rich_text_editor"=> [
|
114
|
-
{
|
115
|
-
"title"=> 'Update this title',
|
116
|
-
"url"=> '',
|
117
|
-
"locale"=> 'en-us',
|
118
|
-
"uid"=> 'entry_uid_1',
|
119
|
-
"_content_type_uid"=> 'content_block',
|
120
|
-
"_version"=> 5,
|
121
|
-
"_in_progress"=> false,
|
122
|
-
"multi_line"=> '',
|
123
|
-
"_embedded_items"=> {
|
124
|
-
"rich_text_editor"=> [
|
125
|
-
{
|
126
|
-
"uid"=> 'entry_uid_1',
|
127
|
-
"_content_type_uid"=> 'content_block'
|
128
|
-
}
|
129
|
-
]
|
130
|
-
},
|
131
|
-
"rich_text_editor"=> '<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_1" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="content_block" sys-style-type="inline" type="entry"> asfsaf </figure>',
|
132
|
-
},
|
133
|
-
{
|
134
|
-
"title"=> 'updated title',
|
135
|
-
"rich_text_editor"=> [
|
136
|
-
'<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/DIABETICDIET-800x600.jpg" data-sys-asset-uid="asset_uid_2" data-sys-asset-filename="DIABETICDIET-800x600.jpg" data-sys-asset-contenttype="image/jpeg" type="asset" sys-style-type="display"></figure>'
|
137
|
-
],
|
138
|
-
"locale"=> 'en-us',
|
139
|
-
"uid"=> 'entry_uid_3',
|
140
|
-
"_content_type_uid"=> 'embeddedrte',
|
141
|
-
"_in_progress"=> false,
|
142
|
-
"_embedded_items"=> {
|
143
|
-
"rich_text_editor"=> [
|
144
|
-
{
|
145
|
-
"uid"=> 'asset_uid_2',
|
146
|
-
"_content_type_uid"=> 'sys_assets',
|
147
|
-
}
|
148
|
-
]
|
149
|
-
}
|
150
|
-
},
|
151
|
-
{
|
152
|
-
"title"=> 'Entry with embedded entry',
|
153
|
-
"rich_text_editor"=> [
|
154
|
-
'<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="block" type="entry"></figure>\n<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="inline" type="entry"></figure>\n<p><br><br></p>\n<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/html5.png" data-sys-asset-uid="asset_uid_3" data-sys-asset-filename="html5.png" data-sys-asset-contenttype="image/png" type="asset" sys-style-type="display"></figure>'
|
155
|
-
],
|
156
|
-
"locale"=> 'en-us',
|
157
|
-
"uid"=> 'entry_uid_2',
|
158
|
-
"_content_type_uid"=> 'embeddedrte',
|
159
|
-
"_in_progress"=> false,
|
160
|
-
"_embedded_items"=> {
|
161
|
-
"rich_text_editor"=> [
|
162
|
-
{
|
163
|
-
"uid"=> 'entry_uid_4',
|
164
|
-
"_content_type_uid"=> '1234'
|
165
|
-
},
|
166
|
-
{
|
167
|
-
"uid"=> 'entry_uid_4',
|
168
|
-
"_content_type_uid"=> '1234'
|
169
|
-
},
|
170
|
-
{
|
171
|
-
"uid"=> 'asset_uid_3',
|
172
|
-
"_content_type_uid"=> 'sys_assets'
|
173
|
-
}
|
174
|
-
]
|
175
|
-
}
|
176
|
-
},
|
177
|
-
{
|
178
|
-
"uid"=> 'entry_uid_6',
|
179
|
-
"_content_type_uid"=> 'sys_assets',
|
180
|
-
"content_type"=> 'image/png',
|
181
|
-
"file_size"=> '36743',
|
182
|
-
"filename"=> 'svg-logo-text.png',
|
183
|
-
"url"=> '/v3/svg-logo-text.png',
|
184
|
-
"title"=> 'svg-logo-text.png',
|
185
|
-
"description"=> ''
|
186
|
-
}
|
187
|
-
],
|
188
|
-
"rte"=> [
|
189
|
-
{
|
190
|
-
"uid"=> 'entry_uid_6',
|
191
|
-
"content_type"=> 'image/png',
|
192
|
-
"_content_type_uid"=> 'sys_assets',
|
193
|
-
"file_size"=> '36743',
|
194
|
-
"filename"=> 'svg-logo-text.png',
|
195
|
-
"url"=> '/v3/svg-logo-text.png',
|
196
|
-
"title"=> 'svg-logo-text.png',
|
197
|
-
"description"=> ''
|
198
|
-
},
|
199
|
-
{
|
200
|
-
"title"=> 'Update this title',
|
201
|
-
"url"=> '',
|
202
|
-
"locale"=> 'en-us',
|
203
|
-
"uid"=> 'entry_uid_1',
|
204
|
-
"_content_type_uid"=> 'content_block',
|
205
|
-
"_version"=> 5,
|
206
|
-
"_in_progress"=> false,
|
207
|
-
"multi_line"=> '',
|
208
|
-
"_embedded_items"=> {
|
209
|
-
"rich_text_editor"=> [
|
210
|
-
{
|
211
|
-
"uid"=> 'entry_uid_1',
|
212
|
-
"_content_type_uid"=> 'content_block'
|
213
|
-
}
|
214
|
-
]
|
215
|
-
},
|
216
|
-
"rich_text_editor"=> '<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_1" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="content_block" sys-style-type="inline" type="entry"> asfsaf </figure>',
|
217
|
-
},
|
218
|
-
{
|
219
|
-
"title"=> 'updated title',
|
220
|
-
"rich_text_editor"=> [
|
221
|
-
'<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/DIABETICDIET-800x600.jpg" data-sys-asset-uid="asset_uid_2" data-sys-asset-filename="DIABETICDIET-800x600.jpg" data-sys-asset-contenttype="image/jpeg" type="asset" sys-style-type="display"></figure>'
|
222
|
-
],
|
223
|
-
"locale"=> 'en-us',
|
224
|
-
"uid"=> 'entry_uid_3',
|
225
|
-
"_content_type_uid"=> 'embeddedrte',
|
226
|
-
"_in_progress"=> false,
|
227
|
-
"_embedded_items"=> {
|
228
|
-
"rich_text_editor"=>
|
229
|
-
[
|
230
|
-
{
|
231
|
-
"uid"=> 'asset_uid_2',
|
232
|
-
"_content_type_uid"=> 'sys_assets'
|
233
|
-
}
|
234
|
-
]
|
235
|
-
}
|
236
|
-
},
|
237
|
-
{
|
238
|
-
"title"=> 'Entry with embedded entry',
|
239
|
-
"rich_text_editor"=> [
|
240
|
-
'<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="block" type="entry"></figure>\n<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="inline" type="entry"></figure>\n<p><br><br></p>\n<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/html5.png" data-sys-asset-uid="asset_uid_3" data-sys-asset-filename="html5.png" data-sys-asset-contenttype="image/png" type="asset" sys-style-type="display"></figure>'
|
241
|
-
],
|
242
|
-
"locale"=> 'en-us',
|
243
|
-
"uid"=> 'entry_uid_2',
|
244
|
-
"_content_type_uid"=> 'embeddedrte',
|
245
|
-
"_in_progress"=> false,
|
246
|
-
"_embedded_items"=> {
|
247
|
-
"rich_text_editor"=>[
|
248
|
-
{
|
249
|
-
"uid"=> 'entry_uid_4',
|
250
|
-
"_content_type_uid"=> '1234'
|
251
|
-
},
|
252
|
-
{
|
253
|
-
"uid"=> 'entry_uid_4',
|
254
|
-
"_content_type_uid"=> '1234'
|
255
|
-
},
|
256
|
-
{
|
257
|
-
"uid"=> 'asset_uid_3',
|
258
|
-
"_content_type_uid"=> 'sys_assets'
|
259
|
-
}
|
260
|
-
]
|
261
|
-
}
|
262
|
-
}
|
263
|
-
]
|
264
|
-
}
|
265
|
-
}
|
266
|
-
|
267
|
-
ENTRY_EMBEDDED_OBJECTS = {
|
268
|
-
"title"=> 'entry and assets',
|
269
|
-
"url"=> '/entry-and-assets',
|
270
|
-
"rich_text_editor"=> '<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_3" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="embeddedrte" sys-style-type="block" type="entry"></figure>\n<p></p>\n<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/html5.png" data-sys-asset-uid="entry_uid_6" data-sys-asset-filename="svg-logo-text.png" data-sys-asset-contenttype="image/png" type="asset" sys-style-type="display"></figure>',
|
271
|
-
"locale"=> 'en-us',
|
272
|
-
"_in_progress"=> false,
|
273
|
-
"uid"=> 'entry_uid_4',
|
274
|
-
"rte"=> '<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_1" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="content_block" sys-style-type="block" type="entry"></figure>\n<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_2" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="embeddedrte" sys-style-type="inline" type="entry"></figure>\n<p></p>',
|
275
|
-
"_embedded_items"=> {
|
276
|
-
"rich_text_editor"=> [
|
277
|
-
{
|
278
|
-
"uid"=> 'entry_uid_6',
|
279
|
-
"content_type"=> 'image/png',
|
280
|
-
"file_size"=> '36743',
|
281
|
-
"filename"=> 'svg-logo-text.png',
|
282
|
-
"url"=> '/v3/svg-logo-text.png',
|
283
|
-
"title"=> 'svg-logo-text.png',
|
284
|
-
"description"=> '',
|
285
|
-
"_content_type_uid"=> 'sys_assets',
|
286
|
-
},
|
287
|
-
{
|
288
|
-
"title"=> 'Update this title',
|
289
|
-
"url"=> '',
|
290
|
-
"locale"=> 'en-us',
|
291
|
-
"uid"=> 'entry_uid_1',
|
292
|
-
"_content_type_uid"=> 'content_block',
|
293
|
-
"_version"=> 5,
|
294
|
-
"_in_progress"=> false,
|
295
|
-
"multi_line"=> '',
|
296
|
-
"_embedded_items"=> {
|
297
|
-
"rich_text_editor"=> [
|
298
|
-
{
|
299
|
-
"uid"=> 'entry_uid_1',
|
300
|
-
"_content_type_uid"=> 'content_block'
|
301
|
-
}
|
302
|
-
]
|
303
|
-
},
|
304
|
-
"rich_text_editor"=> '<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_1" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="content_block" sys-style-type="inline" type="entry"></figure>',
|
305
|
-
},
|
306
|
-
{
|
307
|
-
"title"=> 'updated title',
|
308
|
-
"rich_text_editor"=> [
|
309
|
-
'<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/DIABETICDIET-800x600.jpg" data-sys-asset-uid="asset_uid_2" data-sys-asset-filename="DIABETICDIET-800x600.jpg" data-sys-asset-contenttype="image/jpeg" type="asset" sys-style-type="display"></figure>'
|
310
|
-
],
|
311
|
-
"locale"=> 'en-us',
|
312
|
-
"uid"=> 'entry_uid_3',
|
313
|
-
"_content_type_uid"=> 'embeddedrte',
|
314
|
-
"_in_progress"=> false,
|
315
|
-
"_embedded_items"=> {
|
316
|
-
"rich_text_editor"=>
|
317
|
-
[
|
318
|
-
{
|
319
|
-
"uid"=> 'asset_uid_2',
|
320
|
-
"_content_type_uid"=> 'sys_assets'
|
321
|
-
}
|
322
|
-
]
|
323
|
-
}
|
324
|
-
},
|
325
|
-
{
|
326
|
-
"title"=> 'Entry with embedded entry',
|
327
|
-
"rich_text_editor"=> [
|
328
|
-
'<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="block" type="entry"></figure>\n<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="inline" type="entry"></figure>\n<p><br><br></p>\n<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/html5.png" data-sys-asset-uid="asset_uid_3" data-sys-asset-filename="html5.png" data-sys-asset-contenttype="image/png" type="asset" sys-style-type="display"></figure>'
|
329
|
-
],
|
330
|
-
"locale"=> 'en-us',
|
331
|
-
"uid"=> 'entry_uid_2',
|
332
|
-
"_content_type_uid"=> 'embeddedrte',
|
333
|
-
"_in_progress"=> false,
|
334
|
-
"_embedded_items"=> {
|
335
|
-
"rich_text_editor"=> [
|
336
|
-
{
|
337
|
-
"uid"=> 'entry_uid_4',
|
338
|
-
"_content_type_uid"=> '1234'
|
339
|
-
},
|
340
|
-
{
|
341
|
-
"uid"=> 'entry_uid_4',
|
342
|
-
"_content_type_uid"=> '1234'
|
343
|
-
},
|
344
|
-
{
|
345
|
-
"uid"=> 'asset_uid_3',
|
346
|
-
"_content_type_uid"=> 'sys_assets'
|
347
|
-
}
|
348
|
-
]
|
349
|
-
}
|
350
|
-
}
|
351
|
-
],
|
352
|
-
"rte"=> [
|
353
|
-
{
|
354
|
-
"title"=> 'Update this title',
|
355
|
-
"url"=> '',
|
356
|
-
"locale"=> 'en-us',
|
357
|
-
"uid"=> 'entry_uid_1',
|
358
|
-
"_content_type_uid"=> 'content_block',
|
359
|
-
"_version"=> 5,
|
360
|
-
"_in_progress"=> false,
|
361
|
-
"multi_line"=> '',
|
362
|
-
"_embedded_items"=> {
|
363
|
-
"rich_text_editor"=>[
|
364
|
-
{
|
365
|
-
"uid"=> 'entry_uid_1',
|
366
|
-
"_content_type_uid"=> 'content_block'
|
367
|
-
}
|
368
|
-
]
|
369
|
-
},
|
370
|
-
"rich_text_editor"=> '<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_1" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="content_block" sys-style-type="inline" type="entry"></figure>',
|
371
|
-
},
|
372
|
-
{
|
373
|
-
"title"=> 'updated title',
|
374
|
-
"rich_text_editor"=> [
|
375
|
-
'<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/DIABETICDIET-800x600.jpg" data-sys-asset-uid="asset_uid_2" data-sys-asset-filename="DIABETICDIET-800x600.jpg" data-sys-asset-contenttype="image/jpeg" type="asset" sys-style-type="display"></figure>'
|
376
|
-
],
|
377
|
-
"locale"=> 'en-us',
|
378
|
-
"uid"=> 'entry_uid_3',
|
379
|
-
"_content_type_uid"=> 'embeddedrte',
|
380
|
-
"_in_progress"=> false,
|
381
|
-
"_embedded_items"=> {
|
382
|
-
"rich_text_editor"=>
|
383
|
-
[
|
384
|
-
{
|
385
|
-
"uid"=> 'asset_uid_2',
|
386
|
-
"_content_type_uid"=> 'sys_assets',
|
387
|
-
}
|
388
|
-
]
|
389
|
-
}
|
390
|
-
},
|
391
|
-
{
|
392
|
-
"title"=> 'Entry with embedded entry',
|
393
|
-
"rich_text_editor"=> [
|
394
|
-
'<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="block" type="entry"></figure>\n<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="inline" type="entry"></figure>\n<p><br><br></p>\n<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/html5.png" data-sys-asset-uid="asset_uid_3" data-sys-asset-filename="html5.png" data-sys-asset-contenttype="image/png" type="asset" sys-style-type="display"></figure>'
|
395
|
-
],
|
396
|
-
"locale"=> 'en-us',
|
397
|
-
"uid"=> 'entry_uid_2',
|
398
|
-
"_content_type_uid"=> 'embeddedrte',
|
399
|
-
"_in_progress"=> false,
|
400
|
-
"_embedded_items"=> {
|
401
|
-
"rich_text_editor"=>[
|
402
|
-
{
|
403
|
-
"uid"=> 'entry_uid_4',
|
404
|
-
"_content_type_uid"=> '1234'
|
405
|
-
},
|
406
|
-
{
|
407
|
-
"uid"=> 'entry_uid_4',
|
408
|
-
"_content_type_uid"=> '1234'
|
409
|
-
},
|
410
|
-
{
|
411
|
-
"uid"=> 'asset_uid_3',
|
412
|
-
"_content_type_uid"=> 'sys_assets'
|
413
|
-
}
|
414
|
-
]
|
415
|
-
}
|
416
|
-
}
|
417
|
-
]
|
418
|
-
}
|
419
|
-
}
|
420
|
-
ENNTRY_MULTIPLE_EMBED = {
|
421
|
-
"title"=> 'entry and assets',
|
422
|
-
"url"=> '/entry-and-assets',
|
423
|
-
"rich_text_editor"=> '<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_3" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="embeddedrte" sys-style-type="block" type="entry"></figure>\n<p></p>\n<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/html5.png" data-sys-asset-uid="entry_uid_6" data-sys-asset-filename="svg-logo-text.png" data-sys-asset-contenttype="image/png" type="asset" sys-style-type="display"></figure>',
|
424
|
-
"locale"=> 'en-us',
|
425
|
-
"_in_progress"=> false,
|
426
|
-
"uid"=> 'entry_uid_4',
|
427
|
-
"rte"=> '<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_1" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="content_block" sys-style-type="block" type="entry"></figure>\n<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_2" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="embeddedrte" sys-style-type="inline" type="entry"></figure>\n<p></p>',
|
428
|
-
"_embedded_items"=> {
|
429
|
-
"rich_text_editor"=> [
|
430
|
-
{
|
431
|
-
"uid"=> 'entry_uid_6',
|
432
|
-
"content_type"=> 'image/png',
|
433
|
-
"file_size"=> '36743',
|
434
|
-
"filename"=> 'svg-logo-text.png',
|
435
|
-
"url"=> '/v3/svg-logo-text.png',
|
436
|
-
"title"=> 'svg-logo-text.png',
|
437
|
-
"description"=> '',
|
438
|
-
"_content_type_uid"=> 'sys_assets',
|
439
|
-
},
|
440
|
-
{
|
441
|
-
"title"=> 'Update this title',
|
442
|
-
"url"=> '',
|
443
|
-
"locale"=> 'en-us',
|
444
|
-
"uid"=> 'entry_uid_1',
|
445
|
-
"_content_type_uid"=> 'content_block',
|
446
|
-
"_version"=> 5,
|
447
|
-
"_in_progress"=> false,
|
448
|
-
"multi_line"=> '',
|
449
|
-
"_embedded_items"=> {
|
450
|
-
"rich_text_editor"=> [
|
451
|
-
{
|
452
|
-
"uid"=> 'entry_uid_1',
|
453
|
-
"_content_type_uid"=> 'content_block'
|
454
|
-
}
|
455
|
-
]
|
456
|
-
},
|
457
|
-
"rich_text_editor"=> '<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_1" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="content_block" sys-style-type="inline" type="entry"></figure>',
|
458
|
-
},
|
459
|
-
{
|
460
|
-
"title"=> 'updated title',
|
461
|
-
"rich_text_editor"=> [
|
462
|
-
'<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/DIABETICDIET-800x600.jpg" data-sys-asset-uid="asset_uid_2" data-sys-asset-filename="DIABETICDIET-800x600.jpg" data-sys-asset-contenttype="image/jpeg" type="asset" sys-style-type="display"></figure>'
|
463
|
-
],
|
464
|
-
"locale"=> 'en-us',
|
465
|
-
"uid"=> 'entry_uid_3',
|
466
|
-
"_content_type_uid"=> 'embeddedrte',
|
467
|
-
"_in_progress"=> false,
|
468
|
-
"_embedded_items"=> {
|
469
|
-
"rich_text_editor"=>[
|
470
|
-
{
|
471
|
-
"_content_type_uid"=> 'sys_assets',
|
472
|
-
"uid"=> 'asset_uid_2',
|
473
|
-
"content_type"=> 'image/png',
|
474
|
-
"file_size"=> '36743',
|
475
|
-
"filename"=> 'svg-logo-text.png',
|
476
|
-
"url"=> '/v3/svg-logo-text.png',
|
477
|
-
"title"=> 'svg-logo-text.png',
|
478
|
-
"description"=> ''
|
479
|
-
}
|
480
|
-
]
|
481
|
-
}
|
482
|
-
},
|
483
|
-
{
|
484
|
-
"title"=> 'Entry with embedded entry',
|
485
|
-
"rich_text_editor"=> [
|
486
|
-
'<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="block" type="entry"></figure>\n<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="inline" type="entry"></figure>\n<p><br><br></p>\n<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/html5.png" data-sys-asset-uid="asset_uid_3" data-sys-asset-filename="html5.png" data-sys-asset-contenttype="image/png" type="asset" sys-style-type="display"></figure>'
|
487
|
-
],
|
488
|
-
"locale"=> 'en-us',
|
489
|
-
"uid"=> 'entry_uid_2',
|
490
|
-
"_content_type_uid"=> 'embeddedrte',
|
491
|
-
"_in_progress"=> false,
|
492
|
-
"_embedded_items"=> {
|
493
|
-
"rich_text_editor"=>[
|
494
|
-
{
|
495
|
-
"uid"=> 'entry_uid_4',
|
496
|
-
"_content_type_uid"=> '1234'
|
497
|
-
},
|
498
|
-
{
|
499
|
-
"uid"=> 'entry_uid_4',
|
500
|
-
"_content_type_uid"=> '1234'
|
501
|
-
},
|
502
|
-
{
|
503
|
-
"uid"=> 'asset_uid_3',
|
504
|
-
"_content_type_uid"=> 'sys_assets'
|
505
|
-
}
|
506
|
-
]
|
507
|
-
},
|
508
|
-
}
|
509
|
-
],
|
510
|
-
"rte"=> [
|
511
|
-
{
|
512
|
-
"uid"=> 'entry_uid_6',
|
513
|
-
"content_type"=> 'image/png',
|
514
|
-
"_content_type_uid"=> 'sys_assets',
|
515
|
-
"file_size"=> '36743',
|
516
|
-
"filename"=> 'svg-logo-text.png',
|
517
|
-
"url"=> '/v3/svg-logo-text.png',
|
518
|
-
"title"=> 'svg-logo-text.png',
|
519
|
-
"description"=> ''
|
520
|
-
},
|
521
|
-
{
|
522
|
-
"title"=> 'Update this title',
|
523
|
-
"url"=> '',
|
524
|
-
"locale"=> 'en-us',
|
525
|
-
"uid"=> 'entry_uid_1',
|
526
|
-
"_content_type_uid"=> 'content_block',
|
527
|
-
"_version"=> 5,
|
528
|
-
"_in_progress"=> false,
|
529
|
-
"multi_line"=> '',
|
530
|
-
"_embedded_items"=> {
|
531
|
-
"rich_text_editor"=>[
|
532
|
-
{
|
533
|
-
"uid"=> 'entry_uid_1',
|
534
|
-
"_content_type_uid"=> 'content_block'
|
535
|
-
}
|
536
|
-
]
|
537
|
-
},
|
538
|
-
"rich_text_editor"=> '<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_1" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="content_block" sys-style-type="inline" type="entry"></figure>',
|
539
|
-
},
|
540
|
-
{
|
541
|
-
"title"=> 'updated title',
|
542
|
-
"rich_text_editor"=> [
|
543
|
-
'<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/DIABETICDIET-800x600.jpg" data-sys-asset-uid="asset_uid_2" data-sys-asset-filename="DIABETICDIET-800x600.jpg" data-sys-asset-contenttype="image/jpeg" type="asset" sys-style-type="display"></figure>'
|
544
|
-
],
|
545
|
-
"locale"=> 'en-us',
|
546
|
-
"uid"=> 'entry_uid_3',
|
547
|
-
"_content_type_uid"=> 'embeddedrte',
|
548
|
-
"_in_progress"=> false,
|
549
|
-
"_embedded_items"=> {
|
550
|
-
"rich_text_editor"=>[
|
551
|
-
{
|
552
|
-
"uid"=> 'asset_uid_2',
|
553
|
-
"content_type"=> 'image/png',
|
554
|
-
"file_size"=> '36743',
|
555
|
-
"filename"=> 'svg-logo-text.png',
|
556
|
-
"url"=> '/v3/svg-logo-text.png',
|
557
|
-
"title"=> 'svg-logo-text.png',
|
558
|
-
"description"=> '',
|
559
|
-
"_content_type_uid"=> 'sys_assets',
|
560
|
-
}
|
561
|
-
]
|
562
|
-
}
|
563
|
-
},
|
564
|
-
{
|
565
|
-
"title"=> 'Entry with embedded entry',
|
566
|
-
"rich_text_editor"=> [
|
567
|
-
'<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="block" type="entry"></figure>\n<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="inline" type="entry"></figure>\n<p><br><br></p>\n<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/html5.png" data-sys-asset-uid="asset_uid_3" data-sys-asset-filename="html5.png" data-sys-asset-contenttype="image/png" type="asset" sys-style-type="display"></figure>'
|
568
|
-
],
|
569
|
-
"locale"=> 'en-us',
|
570
|
-
"uid"=> 'entry_uid_2',
|
571
|
-
"_content_type_uid"=> 'embeddedrte',
|
572
|
-
"_in_progress"=> false,
|
573
|
-
"_embedded_items"=> {
|
574
|
-
"rich_text_editor"=> [
|
575
|
-
{
|
576
|
-
"uid"=> 'entry_uid_4',
|
577
|
-
"_content_type_uid"=> '1234'
|
578
|
-
},
|
579
|
-
{
|
580
|
-
"uid"=> 'entry_uid_4',
|
581
|
-
"_content_type_uid"=> '1234'
|
582
|
-
},
|
583
|
-
{
|
584
|
-
"uid"=> 'asset_uid_3',
|
585
|
-
"_content_type_uid"=> 'sys_assets',
|
586
|
-
}
|
587
|
-
]
|
588
|
-
}
|
589
|
-
}
|
590
|
-
]
|
591
|
-
},
|
592
|
-
}
|
593
|
-
|
594
|
-
ENTRY_ASSET_RICH_TEXT = "<p></p>
|
595
|
-
<img src='/v3/dummy.pdf' alt='dummy.pdf' />\\n<img data-image=\"236uaymkloww\" src=\"https://contentstack.image/v3/html5.png\" data-sys-asset-uid=\"entry_uid_9\" alt=\"html5.png\">\\n<p></p>\\n<img src='/v3/svg-logo-text.png' alt='svg-logo-text.png' />"
|
596
|
-
|
597
|
-
ENTRY_ASSET_RICH_TEXT_RENDER_OPTION = "<p></p>
|
598
|
-
<img src=\"/v3/dummy.pdf\" alt=\"Alternet Text\" />\\n<img data-image=\"236uaymkloww\" src=\"https://contentstack.image/v3/html5.png\" data-sys-asset-uid=\"entry_uid_9\" alt=\"html5.png\">\\n<p></p>\\n<img src=\"/v3/svg-logo-text.png\" alt=\"Alternet Text\" />"
|
599
|
-
|
600
|
-
ENTRY_MULTIPLE_RICH_TEXT = "<div><p>updated title</p><p>Content type: <span>embeddedrte</span></p></div>\\n<p></p>\\n<img src='/v3/svg-logo-text.png' alt='svg-logo-text.png' />"
|
601
|
-
|
602
|
-
entrymultipleRTE = "<div><p>Update this title</p><p>Content type=> <span>content_block</span></p></div>
|
603
|
-
<span>Entry with embedded entry</span>
|
604
|
-
<p></p>"
|
605
|
-
|
606
|
-
entrymultipleRTERenderOption = "<div>
|
607
|
-
<div>Update this title</div>
|
608
|
-
<div><span>entry_uid_1</span>
|
609
|
-
</div>
|
610
|
-
<div>
|
611
|
-
<div>entry_uid_2</div>
|
612
|
-
<MYCONTENT><div><p>entry_uid_4</p><p>Content type=> <span>1234</span></p></div>
|
613
|
-
<span>entry_uid_4</span>
|
614
|
-
<p><br><br></p>
|
615
|
-
<img src='undefined' alt='asset_uid_3' /></MYCONTENT>
|
616
|
-
</div>
|
1
|
+
NO_HTML = 'non html string'
|
2
|
+
SIMPLE_HTML = '<h1>Hello</h1> World'
|
3
|
+
|
4
|
+
ENTRY_BLOCK = '<figure class="embedded-entry block-entry" data-redactor-type="embed" type="entry" data-sys-entry-uid="entry_uid_7" data-sys-entry-locale="en-us" data-sys-content-type-uid="article" sys-style-type="block">{{title}}</figure>'
|
5
|
+
ENTRY_INLINE = '<figure class="embedded-entry inline-entry" data-redactor-type="embed" type="entry" data-sys-entry-uid="entry_uid_7" data-sys-entry-locale="en-us" data-sys-content-type-uid="article" style="display:inline;" sys-style-type="inline">{{title}}
|
6
|
+
</figure>'
|
7
|
+
ENTRY_LINK ='<figure class="embedded-entry link-entry" type="entry" data-sys-entry-locale="en-us" data-sys-entry-uid="entry_uid_7" href="/this-is-unique-title" data-sys-content-type-uid="article" style="display:inline;" sys-style-type="link">{{title}}
|
8
|
+
</figure>'
|
9
|
+
|
10
|
+
ASSET_DISPLAY = '<figure class="embedded-asset" alt="{{object.title}}" data-redactor-type="embed" data-sys-asset-filelink="{{url}}" data-sys-asset-filename="Cuvier-67_Autruche_d_Afrique.jpg" data-sys-asset-contenttype="image/png" type="asset" data-sys-asset-uid="entry_uid_7" style="display:inline;" sys-style-type="display">
|
11
|
+
</figure>'
|
12
|
+
ASSET_DOWNLOAD = '<figure class="embedded-asset" data-redactor-type="embed" data-sys-asset-filelink="{{url}}" data-sys-asset-uid="entry_uid_8" data-sys-asset-filename="iphone-mockup.png" data-sys-asset-contenttype="image/png" data-sys-asset-alt="iphone-mockup.png" data-sys-asset-caption="Caption" data-sys-asset-link="{{link}}" data-sys-asset-position="center" data-sys-asset-isnewtab="true" type="asset" sys-style-type="download"></figure>'
|
13
|
+
|
14
|
+
ENTRY_CONTENT_BLANK = {
|
15
|
+
"uid"=> "uid",
|
16
|
+
"_content_type_uid"=> "content_type_uid",
|
17
|
+
}
|
18
|
+
|
19
|
+
ENTRY_CONTENT_URL = {
|
20
|
+
"uid"=> "uid",
|
21
|
+
"url"=> "url",
|
22
|
+
"_content_type_uid"=> "content_type_uid"
|
23
|
+
}
|
24
|
+
|
25
|
+
ASSET_CONTENT_URL = {
|
26
|
+
"uid"=> "uid",
|
27
|
+
"url"=> "url",
|
28
|
+
"title"=> "title",
|
29
|
+
"_content_type_uid"=> "content_type_uid"
|
30
|
+
}
|
31
|
+
|
32
|
+
ENTRY_CONTENT_TITLE = {
|
33
|
+
"uid"=> "uid",
|
34
|
+
"title"=> "title",
|
35
|
+
"_content_type_uid"=> "content_type_uid"
|
36
|
+
}
|
37
|
+
|
38
|
+
ENTRY_CONTENT_TITLE_URL = {
|
39
|
+
"uid"=> "uid",
|
40
|
+
"url"=> "url",
|
41
|
+
"title"=> "title",
|
42
|
+
"_content_type_uid"=> "content_type_uid"
|
43
|
+
}
|
44
|
+
|
45
|
+
ENTRY_EMBEDDED_ASSET = {
|
46
|
+
"title"=> 'one',
|
47
|
+
"url"=> '/one',
|
48
|
+
"rich_text_editor"=> '<p></p><figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.asset/v3/dummy.pdf" data-sys-asset-uid="asset_uid_1" data-sys-asset-filename="dummy.pdf" data-sys-asset-contenttype="application/pdf" type="asset" sys-style-type="display"></figure>\n<img data-image="236uaymkloww" src="https://contentstack.image/v3/html5.png" data-sys-asset-uid="entry_uid_9" alt="html5.png">\n<p></p>\n<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/svg-logo-text.png" data-sys-asset-uid="entry_uid_5" data-sys-asset-filename="svg-logo-text.png" data-sys-asset-contenttype="image/png" type="asset" sys-style-type="display"></figure>',
|
49
|
+
"locale"=> 'en-us',
|
50
|
+
"uid"=> 'entry_uid_4',
|
51
|
+
"created_by"=> 'created_at_date',
|
52
|
+
"updated_by"=> 'created_at_date',
|
53
|
+
"created_at"=> '2020-08-13T06:18:18.989Z',
|
54
|
+
"updated_at"=> '2020-08-31T06:06:31.258Z',
|
55
|
+
"markdown"=> '',
|
56
|
+
"_embedded_items"=> {
|
57
|
+
"rich_text_editor"=> [
|
58
|
+
{
|
59
|
+
"_content_type_uid"=> 'sys_assets',
|
60
|
+
"uid"=> 'asset_uid_1',
|
61
|
+
"created_at"=> '2020-08-19T09:13:32.785Z',
|
62
|
+
"updated_at"=> '2020-08-19T09:13:32.785Z',
|
63
|
+
"created_by"=> 'created_at_date',
|
64
|
+
"updated_by"=> 'created_at_date',
|
65
|
+
"content_type"=> 'application/pdf',
|
66
|
+
"file_size"=> '13264',
|
67
|
+
"filename"=> 'dummy.pdf',
|
68
|
+
"url"=> '/v3/dummy.pdf',
|
69
|
+
"_version"=> 1,
|
70
|
+
"title"=> 'dummy.pdf'
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"_content_type_uid"=> 'sys_assets',
|
74
|
+
"uid"=> 'entry_uid_5',
|
75
|
+
"created_at"=> '2020-08-19T09:13:05.864Z',
|
76
|
+
"updated_at"=> '2020-09-10T09:35:28.393Z',
|
77
|
+
"created_by"=> 'created_at_date',
|
78
|
+
"updated_by"=> 'created_at_date',
|
79
|
+
"content_type"=> 'image/png',
|
80
|
+
"file_size"=> '36743',
|
81
|
+
"filename"=> 'svg-logo-text.png',
|
82
|
+
"url"=> '/v3/svg-logo-text.png',
|
83
|
+
"_version"=> 7,
|
84
|
+
"title"=> 'svg-logo-text.png',
|
85
|
+
"description"=> '',
|
86
|
+
}
|
87
|
+
]
|
88
|
+
}
|
89
|
+
}
|
90
|
+
|
91
|
+
ENTRY_ASSET_EMBED_BLANK = {
|
92
|
+
"title"=> 'one',
|
93
|
+
"url"=> '/one',
|
94
|
+
"rich_text_editor"=> '<p> </p><figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.asset/v3/dummy.pdf" data-sys-asset-uid="asset_uid_1" data-sys-asset-filename="dummy.pdf" data-sys-asset-contenttype="application/pdf" type="asset" sys-style-type="display"></figure>\n<img data-image="236uaymkloww" src="https://contentstack.image/v3/html5.png" data-sys-asset-uid="entry_uid_9" alt="html5.png">\n<p></p>\n<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/svg-logo-text.png" data-sys-asset-uid="entry_uid_5" data-sys-asset-filename="svg-logo-text.png" data-sys-asset-contenttype="image/png" type="asset" sys-style-type="display"></figure>',
|
95
|
+
"locale"=> 'en-us',
|
96
|
+
"uid"=> 'entry_uid_4',
|
97
|
+
"created_by"=> 'created_at_date',
|
98
|
+
"updated_by"=> 'created_at_date',
|
99
|
+
"created_at"=> '2020-08-13T06:18:18.989Z',
|
100
|
+
"updated_at"=> '2020-08-31T06:06:31.258Z',
|
101
|
+
"markdown"=> '',
|
102
|
+
}
|
103
|
+
|
104
|
+
ENTRY_EMBEDDED_ENTRIES = {
|
105
|
+
"title"=> 'entry and assets',
|
106
|
+
"url"=> '/entry-and-assets',
|
107
|
+
"rich_text_editor"=> '<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_3" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="embeddedrte" sys-style-type="block" type="entry"></figure>\n<p></p>\n<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/html5.png" data-sys-asset-uid="entry_uid_6" data-sys-asset-filename="svg-logo-text.png" data-sys-asset-contenttype="image/png" type="asset" sys-style-type="display"></figure>',
|
108
|
+
"locale"=> 'en-us',
|
109
|
+
"_in_progress"=> false,
|
110
|
+
"uid"=> 'entry_uid_4',
|
111
|
+
"rte"=> '<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_1" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="content_block" sys-style-type="block" type="entry"></figure>\n<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_2" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="embeddedrte" sys-style-type="inline" type="entry"></figure>\n<p></p>',
|
112
|
+
"_embedded_items"=> {
|
113
|
+
"rich_text_editor"=> [
|
114
|
+
{
|
115
|
+
"title"=> 'Update this title',
|
116
|
+
"url"=> '',
|
117
|
+
"locale"=> 'en-us',
|
118
|
+
"uid"=> 'entry_uid_1',
|
119
|
+
"_content_type_uid"=> 'content_block',
|
120
|
+
"_version"=> 5,
|
121
|
+
"_in_progress"=> false,
|
122
|
+
"multi_line"=> '',
|
123
|
+
"_embedded_items"=> {
|
124
|
+
"rich_text_editor"=> [
|
125
|
+
{
|
126
|
+
"uid"=> 'entry_uid_1',
|
127
|
+
"_content_type_uid"=> 'content_block'
|
128
|
+
}
|
129
|
+
]
|
130
|
+
},
|
131
|
+
"rich_text_editor"=> '<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_1" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="content_block" sys-style-type="inline" type="entry"> asfsaf </figure>',
|
132
|
+
},
|
133
|
+
{
|
134
|
+
"title"=> 'updated title',
|
135
|
+
"rich_text_editor"=> [
|
136
|
+
'<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/DIABETICDIET-800x600.jpg" data-sys-asset-uid="asset_uid_2" data-sys-asset-filename="DIABETICDIET-800x600.jpg" data-sys-asset-contenttype="image/jpeg" type="asset" sys-style-type="display"></figure>'
|
137
|
+
],
|
138
|
+
"locale"=> 'en-us',
|
139
|
+
"uid"=> 'entry_uid_3',
|
140
|
+
"_content_type_uid"=> 'embeddedrte',
|
141
|
+
"_in_progress"=> false,
|
142
|
+
"_embedded_items"=> {
|
143
|
+
"rich_text_editor"=> [
|
144
|
+
{
|
145
|
+
"uid"=> 'asset_uid_2',
|
146
|
+
"_content_type_uid"=> 'sys_assets',
|
147
|
+
}
|
148
|
+
]
|
149
|
+
}
|
150
|
+
},
|
151
|
+
{
|
152
|
+
"title"=> 'Entry with embedded entry',
|
153
|
+
"rich_text_editor"=> [
|
154
|
+
'<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="block" type="entry"></figure>\n<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="inline" type="entry"></figure>\n<p><br><br></p>\n<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/html5.png" data-sys-asset-uid="asset_uid_3" data-sys-asset-filename="html5.png" data-sys-asset-contenttype="image/png" type="asset" sys-style-type="display"></figure>'
|
155
|
+
],
|
156
|
+
"locale"=> 'en-us',
|
157
|
+
"uid"=> 'entry_uid_2',
|
158
|
+
"_content_type_uid"=> 'embeddedrte',
|
159
|
+
"_in_progress"=> false,
|
160
|
+
"_embedded_items"=> {
|
161
|
+
"rich_text_editor"=> [
|
162
|
+
{
|
163
|
+
"uid"=> 'entry_uid_4',
|
164
|
+
"_content_type_uid"=> '1234'
|
165
|
+
},
|
166
|
+
{
|
167
|
+
"uid"=> 'entry_uid_4',
|
168
|
+
"_content_type_uid"=> '1234'
|
169
|
+
},
|
170
|
+
{
|
171
|
+
"uid"=> 'asset_uid_3',
|
172
|
+
"_content_type_uid"=> 'sys_assets'
|
173
|
+
}
|
174
|
+
]
|
175
|
+
}
|
176
|
+
},
|
177
|
+
{
|
178
|
+
"uid"=> 'entry_uid_6',
|
179
|
+
"_content_type_uid"=> 'sys_assets',
|
180
|
+
"content_type"=> 'image/png',
|
181
|
+
"file_size"=> '36743',
|
182
|
+
"filename"=> 'svg-logo-text.png',
|
183
|
+
"url"=> '/v3/svg-logo-text.png',
|
184
|
+
"title"=> 'svg-logo-text.png',
|
185
|
+
"description"=> ''
|
186
|
+
}
|
187
|
+
],
|
188
|
+
"rte"=> [
|
189
|
+
{
|
190
|
+
"uid"=> 'entry_uid_6',
|
191
|
+
"content_type"=> 'image/png',
|
192
|
+
"_content_type_uid"=> 'sys_assets',
|
193
|
+
"file_size"=> '36743',
|
194
|
+
"filename"=> 'svg-logo-text.png',
|
195
|
+
"url"=> '/v3/svg-logo-text.png',
|
196
|
+
"title"=> 'svg-logo-text.png',
|
197
|
+
"description"=> ''
|
198
|
+
},
|
199
|
+
{
|
200
|
+
"title"=> 'Update this title',
|
201
|
+
"url"=> '',
|
202
|
+
"locale"=> 'en-us',
|
203
|
+
"uid"=> 'entry_uid_1',
|
204
|
+
"_content_type_uid"=> 'content_block',
|
205
|
+
"_version"=> 5,
|
206
|
+
"_in_progress"=> false,
|
207
|
+
"multi_line"=> '',
|
208
|
+
"_embedded_items"=> {
|
209
|
+
"rich_text_editor"=> [
|
210
|
+
{
|
211
|
+
"uid"=> 'entry_uid_1',
|
212
|
+
"_content_type_uid"=> 'content_block'
|
213
|
+
}
|
214
|
+
]
|
215
|
+
},
|
216
|
+
"rich_text_editor"=> '<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_1" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="content_block" sys-style-type="inline" type="entry"> asfsaf </figure>',
|
217
|
+
},
|
218
|
+
{
|
219
|
+
"title"=> 'updated title',
|
220
|
+
"rich_text_editor"=> [
|
221
|
+
'<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/DIABETICDIET-800x600.jpg" data-sys-asset-uid="asset_uid_2" data-sys-asset-filename="DIABETICDIET-800x600.jpg" data-sys-asset-contenttype="image/jpeg" type="asset" sys-style-type="display"></figure>'
|
222
|
+
],
|
223
|
+
"locale"=> 'en-us',
|
224
|
+
"uid"=> 'entry_uid_3',
|
225
|
+
"_content_type_uid"=> 'embeddedrte',
|
226
|
+
"_in_progress"=> false,
|
227
|
+
"_embedded_items"=> {
|
228
|
+
"rich_text_editor"=>
|
229
|
+
[
|
230
|
+
{
|
231
|
+
"uid"=> 'asset_uid_2',
|
232
|
+
"_content_type_uid"=> 'sys_assets'
|
233
|
+
}
|
234
|
+
]
|
235
|
+
}
|
236
|
+
},
|
237
|
+
{
|
238
|
+
"title"=> 'Entry with embedded entry',
|
239
|
+
"rich_text_editor"=> [
|
240
|
+
'<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="block" type="entry"></figure>\n<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="inline" type="entry"></figure>\n<p><br><br></p>\n<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/html5.png" data-sys-asset-uid="asset_uid_3" data-sys-asset-filename="html5.png" data-sys-asset-contenttype="image/png" type="asset" sys-style-type="display"></figure>'
|
241
|
+
],
|
242
|
+
"locale"=> 'en-us',
|
243
|
+
"uid"=> 'entry_uid_2',
|
244
|
+
"_content_type_uid"=> 'embeddedrte',
|
245
|
+
"_in_progress"=> false,
|
246
|
+
"_embedded_items"=> {
|
247
|
+
"rich_text_editor"=>[
|
248
|
+
{
|
249
|
+
"uid"=> 'entry_uid_4',
|
250
|
+
"_content_type_uid"=> '1234'
|
251
|
+
},
|
252
|
+
{
|
253
|
+
"uid"=> 'entry_uid_4',
|
254
|
+
"_content_type_uid"=> '1234'
|
255
|
+
},
|
256
|
+
{
|
257
|
+
"uid"=> 'asset_uid_3',
|
258
|
+
"_content_type_uid"=> 'sys_assets'
|
259
|
+
}
|
260
|
+
]
|
261
|
+
}
|
262
|
+
}
|
263
|
+
]
|
264
|
+
}
|
265
|
+
}
|
266
|
+
|
267
|
+
ENTRY_EMBEDDED_OBJECTS = {
|
268
|
+
"title"=> 'entry and assets',
|
269
|
+
"url"=> '/entry-and-assets',
|
270
|
+
"rich_text_editor"=> '<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_3" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="embeddedrte" sys-style-type="block" type="entry"></figure>\n<p></p>\n<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/html5.png" data-sys-asset-uid="entry_uid_6" data-sys-asset-filename="svg-logo-text.png" data-sys-asset-contenttype="image/png" type="asset" sys-style-type="display"></figure>',
|
271
|
+
"locale"=> 'en-us',
|
272
|
+
"_in_progress"=> false,
|
273
|
+
"uid"=> 'entry_uid_4',
|
274
|
+
"rte"=> '<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_1" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="content_block" sys-style-type="block" type="entry"></figure>\n<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_2" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="embeddedrte" sys-style-type="inline" type="entry"></figure>\n<p></p>',
|
275
|
+
"_embedded_items"=> {
|
276
|
+
"rich_text_editor"=> [
|
277
|
+
{
|
278
|
+
"uid"=> 'entry_uid_6',
|
279
|
+
"content_type"=> 'image/png',
|
280
|
+
"file_size"=> '36743',
|
281
|
+
"filename"=> 'svg-logo-text.png',
|
282
|
+
"url"=> '/v3/svg-logo-text.png',
|
283
|
+
"title"=> 'svg-logo-text.png',
|
284
|
+
"description"=> '',
|
285
|
+
"_content_type_uid"=> 'sys_assets',
|
286
|
+
},
|
287
|
+
{
|
288
|
+
"title"=> 'Update this title',
|
289
|
+
"url"=> '',
|
290
|
+
"locale"=> 'en-us',
|
291
|
+
"uid"=> 'entry_uid_1',
|
292
|
+
"_content_type_uid"=> 'content_block',
|
293
|
+
"_version"=> 5,
|
294
|
+
"_in_progress"=> false,
|
295
|
+
"multi_line"=> '',
|
296
|
+
"_embedded_items"=> {
|
297
|
+
"rich_text_editor"=> [
|
298
|
+
{
|
299
|
+
"uid"=> 'entry_uid_1',
|
300
|
+
"_content_type_uid"=> 'content_block'
|
301
|
+
}
|
302
|
+
]
|
303
|
+
},
|
304
|
+
"rich_text_editor"=> '<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_1" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="content_block" sys-style-type="inline" type="entry"></figure>',
|
305
|
+
},
|
306
|
+
{
|
307
|
+
"title"=> 'updated title',
|
308
|
+
"rich_text_editor"=> [
|
309
|
+
'<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/DIABETICDIET-800x600.jpg" data-sys-asset-uid="asset_uid_2" data-sys-asset-filename="DIABETICDIET-800x600.jpg" data-sys-asset-contenttype="image/jpeg" type="asset" sys-style-type="display"></figure>'
|
310
|
+
],
|
311
|
+
"locale"=> 'en-us',
|
312
|
+
"uid"=> 'entry_uid_3',
|
313
|
+
"_content_type_uid"=> 'embeddedrte',
|
314
|
+
"_in_progress"=> false,
|
315
|
+
"_embedded_items"=> {
|
316
|
+
"rich_text_editor"=>
|
317
|
+
[
|
318
|
+
{
|
319
|
+
"uid"=> 'asset_uid_2',
|
320
|
+
"_content_type_uid"=> 'sys_assets'
|
321
|
+
}
|
322
|
+
]
|
323
|
+
}
|
324
|
+
},
|
325
|
+
{
|
326
|
+
"title"=> 'Entry with embedded entry',
|
327
|
+
"rich_text_editor"=> [
|
328
|
+
'<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="block" type="entry"></figure>\n<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="inline" type="entry"></figure>\n<p><br><br></p>\n<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/html5.png" data-sys-asset-uid="asset_uid_3" data-sys-asset-filename="html5.png" data-sys-asset-contenttype="image/png" type="asset" sys-style-type="display"></figure>'
|
329
|
+
],
|
330
|
+
"locale"=> 'en-us',
|
331
|
+
"uid"=> 'entry_uid_2',
|
332
|
+
"_content_type_uid"=> 'embeddedrte',
|
333
|
+
"_in_progress"=> false,
|
334
|
+
"_embedded_items"=> {
|
335
|
+
"rich_text_editor"=> [
|
336
|
+
{
|
337
|
+
"uid"=> 'entry_uid_4',
|
338
|
+
"_content_type_uid"=> '1234'
|
339
|
+
},
|
340
|
+
{
|
341
|
+
"uid"=> 'entry_uid_4',
|
342
|
+
"_content_type_uid"=> '1234'
|
343
|
+
},
|
344
|
+
{
|
345
|
+
"uid"=> 'asset_uid_3',
|
346
|
+
"_content_type_uid"=> 'sys_assets'
|
347
|
+
}
|
348
|
+
]
|
349
|
+
}
|
350
|
+
}
|
351
|
+
],
|
352
|
+
"rte"=> [
|
353
|
+
{
|
354
|
+
"title"=> 'Update this title',
|
355
|
+
"url"=> '',
|
356
|
+
"locale"=> 'en-us',
|
357
|
+
"uid"=> 'entry_uid_1',
|
358
|
+
"_content_type_uid"=> 'content_block',
|
359
|
+
"_version"=> 5,
|
360
|
+
"_in_progress"=> false,
|
361
|
+
"multi_line"=> '',
|
362
|
+
"_embedded_items"=> {
|
363
|
+
"rich_text_editor"=>[
|
364
|
+
{
|
365
|
+
"uid"=> 'entry_uid_1',
|
366
|
+
"_content_type_uid"=> 'content_block'
|
367
|
+
}
|
368
|
+
]
|
369
|
+
},
|
370
|
+
"rich_text_editor"=> '<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_1" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="content_block" sys-style-type="inline" type="entry"></figure>',
|
371
|
+
},
|
372
|
+
{
|
373
|
+
"title"=> 'updated title',
|
374
|
+
"rich_text_editor"=> [
|
375
|
+
'<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/DIABETICDIET-800x600.jpg" data-sys-asset-uid="asset_uid_2" data-sys-asset-filename="DIABETICDIET-800x600.jpg" data-sys-asset-contenttype="image/jpeg" type="asset" sys-style-type="display"></figure>'
|
376
|
+
],
|
377
|
+
"locale"=> 'en-us',
|
378
|
+
"uid"=> 'entry_uid_3',
|
379
|
+
"_content_type_uid"=> 'embeddedrte',
|
380
|
+
"_in_progress"=> false,
|
381
|
+
"_embedded_items"=> {
|
382
|
+
"rich_text_editor"=>
|
383
|
+
[
|
384
|
+
{
|
385
|
+
"uid"=> 'asset_uid_2',
|
386
|
+
"_content_type_uid"=> 'sys_assets',
|
387
|
+
}
|
388
|
+
]
|
389
|
+
}
|
390
|
+
},
|
391
|
+
{
|
392
|
+
"title"=> 'Entry with embedded entry',
|
393
|
+
"rich_text_editor"=> [
|
394
|
+
'<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="block" type="entry"></figure>\n<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="inline" type="entry"></figure>\n<p><br><br></p>\n<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/html5.png" data-sys-asset-uid="asset_uid_3" data-sys-asset-filename="html5.png" data-sys-asset-contenttype="image/png" type="asset" sys-style-type="display"></figure>'
|
395
|
+
],
|
396
|
+
"locale"=> 'en-us',
|
397
|
+
"uid"=> 'entry_uid_2',
|
398
|
+
"_content_type_uid"=> 'embeddedrte',
|
399
|
+
"_in_progress"=> false,
|
400
|
+
"_embedded_items"=> {
|
401
|
+
"rich_text_editor"=>[
|
402
|
+
{
|
403
|
+
"uid"=> 'entry_uid_4',
|
404
|
+
"_content_type_uid"=> '1234'
|
405
|
+
},
|
406
|
+
{
|
407
|
+
"uid"=> 'entry_uid_4',
|
408
|
+
"_content_type_uid"=> '1234'
|
409
|
+
},
|
410
|
+
{
|
411
|
+
"uid"=> 'asset_uid_3',
|
412
|
+
"_content_type_uid"=> 'sys_assets'
|
413
|
+
}
|
414
|
+
]
|
415
|
+
}
|
416
|
+
}
|
417
|
+
]
|
418
|
+
}
|
419
|
+
}
|
420
|
+
ENNTRY_MULTIPLE_EMBED = {
|
421
|
+
"title"=> 'entry and assets',
|
422
|
+
"url"=> '/entry-and-assets',
|
423
|
+
"rich_text_editor"=> '<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_3" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="embeddedrte" sys-style-type="block" type="entry"></figure>\n<p></p>\n<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/html5.png" data-sys-asset-uid="entry_uid_6" data-sys-asset-filename="svg-logo-text.png" data-sys-asset-contenttype="image/png" type="asset" sys-style-type="display"></figure>',
|
424
|
+
"locale"=> 'en-us',
|
425
|
+
"_in_progress"=> false,
|
426
|
+
"uid"=> 'entry_uid_4',
|
427
|
+
"rte"=> '<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_1" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="content_block" sys-style-type="block" type="entry"></figure>\n<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_2" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="embeddedrte" sys-style-type="inline" type="entry"></figure>\n<p></p>',
|
428
|
+
"_embedded_items"=> {
|
429
|
+
"rich_text_editor"=> [
|
430
|
+
{
|
431
|
+
"uid"=> 'entry_uid_6',
|
432
|
+
"content_type"=> 'image/png',
|
433
|
+
"file_size"=> '36743',
|
434
|
+
"filename"=> 'svg-logo-text.png',
|
435
|
+
"url"=> '/v3/svg-logo-text.png',
|
436
|
+
"title"=> 'svg-logo-text.png',
|
437
|
+
"description"=> '',
|
438
|
+
"_content_type_uid"=> 'sys_assets',
|
439
|
+
},
|
440
|
+
{
|
441
|
+
"title"=> 'Update this title',
|
442
|
+
"url"=> '',
|
443
|
+
"locale"=> 'en-us',
|
444
|
+
"uid"=> 'entry_uid_1',
|
445
|
+
"_content_type_uid"=> 'content_block',
|
446
|
+
"_version"=> 5,
|
447
|
+
"_in_progress"=> false,
|
448
|
+
"multi_line"=> '',
|
449
|
+
"_embedded_items"=> {
|
450
|
+
"rich_text_editor"=> [
|
451
|
+
{
|
452
|
+
"uid"=> 'entry_uid_1',
|
453
|
+
"_content_type_uid"=> 'content_block'
|
454
|
+
}
|
455
|
+
]
|
456
|
+
},
|
457
|
+
"rich_text_editor"=> '<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_1" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="content_block" sys-style-type="inline" type="entry"></figure>',
|
458
|
+
},
|
459
|
+
{
|
460
|
+
"title"=> 'updated title',
|
461
|
+
"rich_text_editor"=> [
|
462
|
+
'<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/DIABETICDIET-800x600.jpg" data-sys-asset-uid="asset_uid_2" data-sys-asset-filename="DIABETICDIET-800x600.jpg" data-sys-asset-contenttype="image/jpeg" type="asset" sys-style-type="display"></figure>'
|
463
|
+
],
|
464
|
+
"locale"=> 'en-us',
|
465
|
+
"uid"=> 'entry_uid_3',
|
466
|
+
"_content_type_uid"=> 'embeddedrte',
|
467
|
+
"_in_progress"=> false,
|
468
|
+
"_embedded_items"=> {
|
469
|
+
"rich_text_editor"=>[
|
470
|
+
{
|
471
|
+
"_content_type_uid"=> 'sys_assets',
|
472
|
+
"uid"=> 'asset_uid_2',
|
473
|
+
"content_type"=> 'image/png',
|
474
|
+
"file_size"=> '36743',
|
475
|
+
"filename"=> 'svg-logo-text.png',
|
476
|
+
"url"=> '/v3/svg-logo-text.png',
|
477
|
+
"title"=> 'svg-logo-text.png',
|
478
|
+
"description"=> ''
|
479
|
+
}
|
480
|
+
]
|
481
|
+
}
|
482
|
+
},
|
483
|
+
{
|
484
|
+
"title"=> 'Entry with embedded entry',
|
485
|
+
"rich_text_editor"=> [
|
486
|
+
'<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="block" type="entry"></figure>\n<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="inline" type="entry"></figure>\n<p><br><br></p>\n<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/html5.png" data-sys-asset-uid="asset_uid_3" data-sys-asset-filename="html5.png" data-sys-asset-contenttype="image/png" type="asset" sys-style-type="display"></figure>'
|
487
|
+
],
|
488
|
+
"locale"=> 'en-us',
|
489
|
+
"uid"=> 'entry_uid_2',
|
490
|
+
"_content_type_uid"=> 'embeddedrte',
|
491
|
+
"_in_progress"=> false,
|
492
|
+
"_embedded_items"=> {
|
493
|
+
"rich_text_editor"=>[
|
494
|
+
{
|
495
|
+
"uid"=> 'entry_uid_4',
|
496
|
+
"_content_type_uid"=> '1234'
|
497
|
+
},
|
498
|
+
{
|
499
|
+
"uid"=> 'entry_uid_4',
|
500
|
+
"_content_type_uid"=> '1234'
|
501
|
+
},
|
502
|
+
{
|
503
|
+
"uid"=> 'asset_uid_3',
|
504
|
+
"_content_type_uid"=> 'sys_assets'
|
505
|
+
}
|
506
|
+
]
|
507
|
+
},
|
508
|
+
}
|
509
|
+
],
|
510
|
+
"rte"=> [
|
511
|
+
{
|
512
|
+
"uid"=> 'entry_uid_6',
|
513
|
+
"content_type"=> 'image/png',
|
514
|
+
"_content_type_uid"=> 'sys_assets',
|
515
|
+
"file_size"=> '36743',
|
516
|
+
"filename"=> 'svg-logo-text.png',
|
517
|
+
"url"=> '/v3/svg-logo-text.png',
|
518
|
+
"title"=> 'svg-logo-text.png',
|
519
|
+
"description"=> ''
|
520
|
+
},
|
521
|
+
{
|
522
|
+
"title"=> 'Update this title',
|
523
|
+
"url"=> '',
|
524
|
+
"locale"=> 'en-us',
|
525
|
+
"uid"=> 'entry_uid_1',
|
526
|
+
"_content_type_uid"=> 'content_block',
|
527
|
+
"_version"=> 5,
|
528
|
+
"_in_progress"=> false,
|
529
|
+
"multi_line"=> '',
|
530
|
+
"_embedded_items"=> {
|
531
|
+
"rich_text_editor"=>[
|
532
|
+
{
|
533
|
+
"uid"=> 'entry_uid_1',
|
534
|
+
"_content_type_uid"=> 'content_block'
|
535
|
+
}
|
536
|
+
]
|
537
|
+
},
|
538
|
+
"rich_text_editor"=> '<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_1" data-sys-entry-"locale"="en-us" data-sys-content-type-uid="content_block" sys-style-type="inline" type="entry"></figure>',
|
539
|
+
},
|
540
|
+
{
|
541
|
+
"title"=> 'updated title',
|
542
|
+
"rich_text_editor"=> [
|
543
|
+
'<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/DIABETICDIET-800x600.jpg" data-sys-asset-uid="asset_uid_2" data-sys-asset-filename="DIABETICDIET-800x600.jpg" data-sys-asset-contenttype="image/jpeg" type="asset" sys-style-type="display"></figure>'
|
544
|
+
],
|
545
|
+
"locale"=> 'en-us',
|
546
|
+
"uid"=> 'entry_uid_3',
|
547
|
+
"_content_type_uid"=> 'embeddedrte',
|
548
|
+
"_in_progress"=> false,
|
549
|
+
"_embedded_items"=> {
|
550
|
+
"rich_text_editor"=>[
|
551
|
+
{
|
552
|
+
"uid"=> 'asset_uid_2',
|
553
|
+
"content_type"=> 'image/png',
|
554
|
+
"file_size"=> '36743',
|
555
|
+
"filename"=> 'svg-logo-text.png',
|
556
|
+
"url"=> '/v3/svg-logo-text.png',
|
557
|
+
"title"=> 'svg-logo-text.png',
|
558
|
+
"description"=> '',
|
559
|
+
"_content_type_uid"=> 'sys_assets',
|
560
|
+
}
|
561
|
+
]
|
562
|
+
}
|
563
|
+
},
|
564
|
+
{
|
565
|
+
"title"=> 'Entry with embedded entry',
|
566
|
+
"rich_text_editor"=> [
|
567
|
+
'<figure class="embedded-entry block-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="block" type="entry"></figure>\n<figure class="embedded-entry inline-entry" data-sys-entry-uid="entry_uid_4" data-sys-content-type-uid="1234" sys-style-type="inline" type="entry"></figure>\n<p><br><br></p>\n<figure class="embedded-asset" data-sys-asset-filelink="https://contentstack.image/v3/html5.png" data-sys-asset-uid="asset_uid_3" data-sys-asset-filename="html5.png" data-sys-asset-contenttype="image/png" type="asset" sys-style-type="display"></figure>'
|
568
|
+
],
|
569
|
+
"locale"=> 'en-us',
|
570
|
+
"uid"=> 'entry_uid_2',
|
571
|
+
"_content_type_uid"=> 'embeddedrte',
|
572
|
+
"_in_progress"=> false,
|
573
|
+
"_embedded_items"=> {
|
574
|
+
"rich_text_editor"=> [
|
575
|
+
{
|
576
|
+
"uid"=> 'entry_uid_4',
|
577
|
+
"_content_type_uid"=> '1234'
|
578
|
+
},
|
579
|
+
{
|
580
|
+
"uid"=> 'entry_uid_4',
|
581
|
+
"_content_type_uid"=> '1234'
|
582
|
+
},
|
583
|
+
{
|
584
|
+
"uid"=> 'asset_uid_3',
|
585
|
+
"_content_type_uid"=> 'sys_assets',
|
586
|
+
}
|
587
|
+
]
|
588
|
+
}
|
589
|
+
}
|
590
|
+
]
|
591
|
+
},
|
592
|
+
}
|
593
|
+
|
594
|
+
ENTRY_ASSET_RICH_TEXT = "<p></p>
|
595
|
+
<img src='/v3/dummy.pdf' alt='dummy.pdf' />\\n<img data-image=\"236uaymkloww\" src=\"https://contentstack.image/v3/html5.png\" data-sys-asset-uid=\"entry_uid_9\" alt=\"html5.png\">\\n<p></p>\\n<img src='/v3/svg-logo-text.png' alt='svg-logo-text.png' />"
|
596
|
+
|
597
|
+
ENTRY_ASSET_RICH_TEXT_RENDER_OPTION = "<p></p>
|
598
|
+
<img src=\"/v3/dummy.pdf\" alt=\"Alternet Text\" />\\n<img data-image=\"236uaymkloww\" src=\"https://contentstack.image/v3/html5.png\" data-sys-asset-uid=\"entry_uid_9\" alt=\"html5.png\">\\n<p></p>\\n<img src=\"/v3/svg-logo-text.png\" alt=\"Alternet Text\" />"
|
599
|
+
|
600
|
+
ENTRY_MULTIPLE_RICH_TEXT = "<div><p>updated title</p><p>Content type: <span>embeddedrte</span></p></div>\\n<p></p>\\n<img src='/v3/svg-logo-text.png' alt='svg-logo-text.png' />"
|
601
|
+
|
602
|
+
entrymultipleRTE = "<div><p>Update this title</p><p>Content type=> <span>content_block</span></p></div>
|
603
|
+
<span>Entry with embedded entry</span>
|
604
|
+
<p></p>"
|
605
|
+
|
606
|
+
entrymultipleRTERenderOption = "<div>
|
607
|
+
<div>Update this title</div>
|
608
|
+
<div><span>entry_uid_1</span>
|
609
|
+
</div>
|
610
|
+
<div>
|
611
|
+
<div>entry_uid_2</div>
|
612
|
+
<MYCONTENT><div><p>entry_uid_4</p><p>Content type=> <span>1234</span></p></div>
|
613
|
+
<span>entry_uid_4</span>
|
614
|
+
<p><br><br></p>
|
615
|
+
<img src='undefined' alt='asset_uid_3' /></MYCONTENT>
|
616
|
+
</div>
|
617
617
|
<p></p>"
|