Skip to content

Commit 7d9ba5f

Browse files
committed
[FEATURE] Create styled google docs documents from markdown
1 parent 2dadc59 commit 7d9ba5f

File tree

18 files changed

+391
-22
lines changed

18 files changed

+391
-22
lines changed

components/google_docs/actions/append-image/append-image.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "google_docs-append-image",
55
name: "Append Image to Document",
66
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)",
7-
version: "0.0.9",
7+
version: "0.0.10",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/google_docs/actions/append-text/append-text.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "google_docs-append-text",
55
name: "Append Text",
66
description: "Append text to an existing document. [See the documentation](https://developers.google.com/docs/api/reference/rest/v1/documents/request#InsertTextRequest)",
7-
version: "0.1.8",
7+
version: "0.1.9",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/google_docs/actions/create-document-from-template/create-document-from-template.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default {
1313
...others,
1414
key: "google_docs-create-document-from-template",
1515
name: "Create New Document From Template",
16-
version: "0.0.4",
16+
version: "0.0.5",
1717
description,
1818
type,
1919
props: {

components/google_docs/actions/create-document/create-document.mjs

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "google_docs-create-document",
55
name: "Create a New Document",
66
description: "Create a new document. [See the documentation](https://developers.google.com/docs/api/reference/rest/v1/documents/create)",
7-
version: "0.1.8",
7+
version: "0.2.0",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,
@@ -25,6 +25,12 @@ export default {
2525
],
2626
optional: true,
2727
},
28+
useMarkdown: {
29+
type: "boolean",
30+
label: "Use Markdown Format",
31+
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.)",
32+
optional: true,
33+
},
2834
folderId: {
2935
propDefinition: [
3036
googleDocs,
@@ -39,14 +45,20 @@ export default {
3945

4046
// Insert text
4147
if (this.text) {
42-
await this.googleDocs.insertText(documentId, {
43-
text: this.text,
44-
});
48+
if (this.useMarkdown) {
49+
// Use markdown formatting
50+
await this.googleDocs.insertMarkdownText(documentId, this.text);
51+
} else {
52+
// Use plain text
53+
await this.googleDocs.insertText(documentId, {
54+
text: this.text,
55+
});
56+
}
4557
}
4658

4759
// Move file
4860
if (this.folderId) {
49-
// Get file to get parents to remove
61+
// Get file to get parents to remove
5062
const file = await this.googleDocs.getFile(documentId);
5163

5264
// Move file, removing old parents, adding new parent folder

components/google_docs/actions/find-document/find-document.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default {
1414
...others,
1515
key: "google_docs-find-document",
1616
name: "Find Document",
17-
version: "0.0.3",
17+
version: "0.0.4",
1818
description,
1919
type,
2020
props: {

components/google_docs/actions/get-document/get-document.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "google_docs-get-document",
66
name: "Get Document",
77
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)",
8-
version: "0.1.8",
8+
version: "0.1.9",
99
annotations: {
1010
destructiveHint: false,
1111
openWorldHint: true,

components/google_docs/actions/get-tab-content/get-tab-content.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "google_docs-get-tab-content",
55
name: "Get Tab Content",
66
description: "Get the content of a tab in a document. [See the documentation](https://developers.google.com/docs/api/reference/rest/v1/documents/get)",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/google_docs/actions/insert-page-break/insert-page-break.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "google_docs-insert-page-break",
55
name: "Insert Page Break",
66
description: "Insert a page break into a document. [See the documentation](https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#insertpagebreakrequest)",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/google_docs/actions/insert-table/insert-table.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "google_docs-insert-table",
55
name: "Insert Table",
66
description: "Insert a table into a document. [See the documentation](https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#inserttablerequest)",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/google_docs/actions/insert-text/insert-text.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "google_docs-insert-text",
55
name: "Insert Text",
66
description: "Insert text into a document. [See the documentation](https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#inserttextrequest)",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

0 commit comments

Comments
 (0)