Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export async function writeNewDocs(
gid,
url: pages[gid]?.url,
title: pages[gid]?.title || '',
deprecated: pages[gid]?.deprecated || undefined,
description: pages[gid]?.description || '',
examples: pages[gid]?.examples || [],
show_in_navigation:
Expand Down
4 changes: 2 additions & 2 deletions docs/documentation/type._editables.*.styles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ description: >-
examples:
- description: >-
In this example, we have enabled a dropdown menu in our WYSIWYG toolbar to
apply a style to selected text. The styles are defined in the `/css/styles.css`
file.
apply a style to selected text. The styles are defined in the
`/css/styles.css` file.
language: yaml
code: |-
_editables:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
gid: type._inputs.*.(rich-text-input).options.allow_resize
url: /configuration-file/types/_inputs/*/(rich-text-input)/options/allow_resize/
title: ''
deprecated: true
description: >-
**⚠️ DEPRECATED:** This key is deprecated. Use `preview_resize` instead.

This key toggles whether CloudCannon will show the resize handler to
vertically resize the input.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
gid: type._inputs.*.(rich-text-input).options.prevent_resize
url: /configuration-file/types/_inputs/*/(rich-text-input)/options/prevent_resize/
title: ''
description: Shows or hides the resize handler to vertically resize the input.
examples: []
show_in_navigation: false
1 change: 1 addition & 0 deletions docs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ function docToPage(
gid,
title: documentation?.title,
description: documentation?.description || doc.description,
deprecated: !!doc.deprecated,
examples: documentation?.examples?.length
? documentation.examples
: developer_documentation?.examples,
Expand Down
1 change: 1 addition & 0 deletions docs/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export interface Page {
title?: DocumentationEntry['title'];
description?: DocumentationEntry['description'];
examples?: Example[];
deprecated: boolean;
documentation?: DocumentationEntry;
developer_documentation?: DocumentationEntry;
url: string;
Expand Down
5 changes: 4 additions & 1 deletion generate-schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,10 @@ for (const schemaConfig of schemas) {

if (schemaConfig.redocument) {
const docsFolder =
'docsFolder' in schemaConfig ? schemaConfig.docsFolder : 'docs/documentation';
'docsFolder' in schemaConfig && schemaConfig.docsFolder
? schemaConfig.docsFolder
: 'docs/documentation';

await redocumentSchema(fullSchemaPath, docsFolder, {
stripId: schemaConfig.stripId,
addMarkdownDescription: schemaConfig.addMarkdownDescription,
Expand Down
8 changes: 6 additions & 2 deletions src/inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,12 @@ export const RichTextInputOptionsSchema = z
...TextValidationSchema.shape,
...RequiredValidationSchema.shape,
empty_type: EmptyTypeTextSchema.optional(),
allow_resize: z.boolean().default(false).optional().meta({
description: 'Shows or hides the resize handler to vertically resize the input.',
allow_resize: z.boolean().optional().meta({
deprecated: true,
description: '**⚠️ DEPRECATED:** This key is deprecated. Use `preview_resize` instead.',
}),
prevent_resize: z.boolean().default(false).optional().meta({
description: 'Hides the resize handler to vertically resize the input.',
}),
initial_height: z.number().optional().meta({
description: 'Defines the initial height of this input in pixels (px).',
Expand Down