Enum ContentType
Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Тип контента Значение перечисления, указывающее тип контента, созданного Update Draft Action Response
.
Чтобы вызвать перечисление, вы вызываете его родительский класс, имя и свойство. Например, CardService.ContentType.TEXT
.
Характеристики
Свойство | Тип | Описание |
---|
TEXT | Enum | Указывает, что сгенерированное содержимое представляет собой обычный текст. По умолчанию. |
MUTABLE_HTML | Enum | Указывает, что созданное содержимое отформатировано как HTML. Содержимое можно редактировать после его создания. |
IMMUTABLE_HTML | Enum | Указывает, что созданное содержимое отформатировано как HTML, но после создания это содержимое нельзя редактировать. |
Если не указано иное, контент на этой странице предоставляется по лицензии Creative Commons "С указанием авторства 4.0", а примеры кода – по лицензии Apache 2.0. Подробнее об этом написано в правилах сайта. Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2025-07-24 UTC.
[null,null,["Последнее обновление: 2025-07-24 UTC."],[[["\u003cp\u003e\u003ccode\u003eContentType\u003c/code\u003e is an enum used to define the type of content generated by \u003ccode\u003eUpdateDraftActionResponse\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eContent types include \u003ccode\u003eTEXT\u003c/code\u003e (default plain text), \u003ccode\u003eMUTABLE_HTML\u003c/code\u003e (editable HTML), and \u003ccode\u003eIMMUTABLE_HTML\u003c/code\u003e (non-editable HTML).\u003c/p\u003e\n"],["\u003cp\u003eTo specify a content type, use the syntax: \u003ccode\u003eCardService.ContentType.PROPERTY\u003c/code\u003e, replacing \u003ccode\u003ePROPERTY\u003c/code\u003e with the desired type.\u003c/p\u003e\n"]]],["The `ContentType` enum specifies the type of content generated by an `UpdateDraftActionResponse`. It has three properties: `TEXT`, `MUTABLE_HTML`, and `IMMUTABLE_HTML`. `TEXT` indicates plain text, which is the default. `MUTABLE_HTML` represents editable HTML content, while `IMMUTABLE_HTML` represents HTML content that cannot be edited after generation. These properties are accessed via `CardService.ContentType` followed by the chosen type, such as `TEXT`.\n"],null,["# Enum ContentType\n\nContentType\n\nAn enum value that specifies the content type of the content generated by a [UpdateDraftActionResponse](/apps-script/reference/card-service/update-draft-action-response).\n\nTo call an enum, you call its parent class, name, and property. For example, `\nCardService.ContentType.TEXT`. \n\n### Properties\n\n| Property | Type | Description |\n|------------------|--------|---------------------------------------------------------------------------------------------------------------------|\n| `TEXT` | `Enum` | Indicates that the generated content is plain text. Default. |\n| `MUTABLE_HTML` | `Enum` | Indicates that the generated content is formatted as HTML. The content can be edited after it is generated. |\n| `IMMUTABLE_HTML` | `Enum` | Indicates that the generated content is formatted as HTML, but this content cannot be edited after it is generated. |"]]