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
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "google_docs-append-image",
name: "Append Image to Document",
description: "Appends an image to the end of a document. [See the documentation](https://developers.google.com/docs/api/reference/rest/v1/documents/request#InsertInlineImageRequest)",
version: "0.0.9",
version: "0.0.10",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
2 changes: 1 addition & 1 deletion components/google_docs/actions/append-text/append-text.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "google_docs-append-text",
name: "Append Text",
description: "Append text to an existing document. [See the documentation](https://developers.google.com/docs/api/reference/rest/v1/documents/request#InsertTextRequest)",
version: "0.1.8",
version: "0.1.9",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
...others,
key: "google_docs-create-document-from-template",
name: "Create New Document From Template",
version: "0.0.4",
version: "0.0.5",
description,
type,
props: {
Expand Down
22 changes: 17 additions & 5 deletions components/google_docs/actions/create-document/create-document.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "google_docs-create-document",
name: "Create a New Document",
description: "Create a new document. [See the documentation](https://developers.google.com/docs/api/reference/rest/v1/documents/create)",
version: "0.1.8",
version: "0.2.0",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand All @@ -25,6 +25,12 @@ export default {
],
optional: true,
},
useMarkdown: {
type: "boolean",
label: "Use Markdown Format",
description: "Enable markdown formatting support. When enabled, the text will be parsed as markdown and converted to Google Docs formatting (headings, bold, italic, lists, etc.)",
optional: true,
},
folderId: {
propDefinition: [
googleDocs,
Expand All @@ -39,14 +45,20 @@ export default {

// Insert text
if (this.text) {
await this.googleDocs.insertText(documentId, {
text: this.text,
});
if (this.useMarkdown) {
// Use markdown formatting
await this.googleDocs.insertMarkdownText(documentId, this.text);
} else {
// Use plain text
await this.googleDocs.insertText(documentId, {
text: this.text,
});
}
}

// Move file
if (this.folderId) {
// Get file to get parents to remove
// Get file to get parents to remove
const file = await this.googleDocs.getFile(documentId);

// Move file, removing old parents, adding new parent folder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default {
...others,
key: "google_docs-find-document",
name: "Find Document",
version: "0.0.3",
version: "0.0.4",
description,
type,
props: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "google_docs-get-document",
name: "Get Document",
description: "Get the contents of the latest version of a document. [See the documentation](https://developers.google.com/docs/api/reference/rest/v1/documents/get)",
version: "0.1.8",
version: "0.1.9",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "google_docs-get-tab-content",
name: "Get Tab Content",
description: "Get the content of a tab in a document. [See the documentation](https://developers.google.com/docs/api/reference/rest/v1/documents/get)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "google_docs-insert-page-break",
name: "Insert Page Break",
description: "Insert a page break into a document. [See the documentation](https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#insertpagebreakrequest)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "google_docs-insert-table",
name: "Insert Table",
description: "Insert a table into a document. [See the documentation](https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#inserttablerequest)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
2 changes: 1 addition & 1 deletion components/google_docs/actions/insert-text/insert-text.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "google_docs-insert-text",
name: "Insert Text",
description: "Insert text into a document. [See the documentation](https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#inserttextrequest)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "google_docs-replace-image",
name: "Replace Image",
description: "Replace image in a existing document. [See the documentation](https://developers.google.com/docs/api/reference/rest/v1/documents/request#ReplaceImageRequest)",
version: "0.0.9",
version: "0.0.10",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "google_docs-replace-text",
name: "Replace Text",
description: "Replace all instances of matched text in an existing document. [See the documentation](https://developers.google.com/docs/api/reference/rest/v1/documents/request#ReplaceAllTextRequest)",
version: "0.0.9",
version: "0.0.10",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand Down
Loading
Loading