From 18b6365308d63ef5aab49df7003eab5ed07849be Mon Sep 17 00:00:00 2001 From: ryanbliss Date: Mon, 6 Jan 2020 15:04:55 -0700 Subject: [PATCH 1/6] render(h) function support for TodoItem --- .../tiptap-extensions/src/nodes/TodoItem.js | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/packages/tiptap-extensions/src/nodes/TodoItem.js b/packages/tiptap-extensions/src/nodes/TodoItem.js index ed9b47a54..4eb4f0e16 100644 --- a/packages/tiptap-extensions/src/nodes/TodoItem.js +++ b/packages/tiptap-extensions/src/nodes/TodoItem.js @@ -29,6 +29,39 @@ export default class TodoItem extends Node {
`, + /* + The render function enables TodoItem to work in `runtimeonly` builds, + which is required for frameworks requiring strict CSP policies. For + example, doing this is required in Chrome Extensions. Having both + the template and the render function ensures there are no issues + converting the node to JSON and rendering the component. + */ + render(h) { + return h('li', { + attrs: { + 'data-type': this.node.type.name, + 'data-done': this.node.attrs.done.toString(), + 'data-drag-handle': '', + }, + }, [ + h('span', { + class: 'todo-checkbox', + attrs: { + contenteditable: false, + }, + on: { + click: this.onChange, + }, + }), + h('div', { + class: 'todo-content', + attrs: { + contenteditable: this.view.editable.toString(), + }, + ref: 'content', + }), + ]); + }, } } From 8ed2de71cd6a3d017c24b7b3507485a4d5b82669 Mon Sep 17 00:00:00 2001 From: ryanbliss Date: Mon, 6 Jan 2020 15:13:20 -0700 Subject: [PATCH 2/6] removed a semicolon that was causing a lint error --- packages/tiptap-extensions/src/nodes/TodoItem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tiptap-extensions/src/nodes/TodoItem.js b/packages/tiptap-extensions/src/nodes/TodoItem.js index 4eb4f0e16..caa05cfca 100644 --- a/packages/tiptap-extensions/src/nodes/TodoItem.js +++ b/packages/tiptap-extensions/src/nodes/TodoItem.js @@ -60,7 +60,7 @@ export default class TodoItem extends Node { }, ref: 'content', }), - ]); + ]) }, } } From ba6be120fbb2f8510b94ca55d7a6a593062d6325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=BB=D1=8C=D1=8F?= Date: Sat, 25 Jan 2020 11:50:15 +0200 Subject: [PATCH 3/6] improvement(History extension): support ru keys --- packages/tiptap-extensions/src/extensions/History.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/tiptap-extensions/src/extensions/History.js b/packages/tiptap-extensions/src/extensions/History.js index 9700dd9c4..9f75be28c 100644 --- a/packages/tiptap-extensions/src/extensions/History.js +++ b/packages/tiptap-extensions/src/extensions/History.js @@ -21,6 +21,9 @@ export default class History extends Extension { 'Mod-z': undo, 'Mod-y': redo, 'Shift-Mod-z': redo, + // Russian language + 'Mod-я': undo, + 'Shift-Mod-я': redo, } return keymap From 6e29f02f798405f7f70c076c5a82eb17d8f5eb27 Mon Sep 17 00:00:00 2001 From: Nisar Hassan Naqvi Date: Mon, 16 Mar 2020 12:13:46 +0000 Subject: [PATCH 4/6] simplifies code contributions by fully automating the dev setup with gitpod. --- .gitpod.yml | 10 ++++++++++ README.md | 13 +++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 .gitpod.yml diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 000000000..484b40150 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,10 @@ +tasks: + - init: yarn install + command: yarn run start +ports: + - port: 3000 + onOpen: open-preview + +vscode: + extensions: + - octref.vetur@0.23.0:0z6KpEz8h/vAvy4pYRDg3Q== \ No newline at end of file diff --git a/README.md b/README.md index 06abf4a09..94a666b2e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # tiptap A renderless and extendable rich-text editor for [Vue.js](https://github.com/vuejs/vue) +[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/scrumpy/tiptap) [![](https://img.shields.io/npm/v/tiptap.svg?label=version)](https://www.npmjs.com/package/tiptap) [![](https://img.shields.io/npm/dm/tiptap.svg)](https://npmcharts.com/compare/tiptap?minimal=true) [![](https://img.shields.io/npm/l/tiptap.svg)](https://www.npmjs.com/package/tiptap) @@ -477,6 +478,18 @@ yarn build:packages yarn build:examples ``` +## Contribute using the online one-click setup + +You can use Gitpod(a free online VS Code-like IDE) for contributing. With a single click, it will launch a workspace and automatically: + +- clone the `tiptap` repo. +- install the dependencies. +- run `yarn run start`. + +So that anyone interested in contributing can start straight away. + +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/scrumpy/tiptap/) + ## Contributing Please see [CONTRIBUTING](CONTRIBUTING.md) for details. From b30f82740b981b613cd6993698ec00016429a178 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Mon, 20 Jul 2020 11:48:11 +0200 Subject: [PATCH 5/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6013a3cd1..b3204ce8c 100644 --- a/README.md +++ b/README.md @@ -501,7 +501,7 @@ You can use Gitpod(a free online VS Code-like IDE) for contributing. With a sing So that anyone interested in contributing can start straight away. -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/scrumpy/tiptap/) +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/ueberdosis/tiptap/) ## Contributing From fb833d12455d7d9d29007da7e4854811f1e6ddc5 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Mon, 20 Jul 2020 11:53:50 +0200 Subject: [PATCH 6/6] remove duplicate code --- .../tiptap-extensions/src/nodes/TodoItem.js | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/packages/tiptap-extensions/src/nodes/TodoItem.js b/packages/tiptap-extensions/src/nodes/TodoItem.js index caa05cfca..ed9b47a54 100644 --- a/packages/tiptap-extensions/src/nodes/TodoItem.js +++ b/packages/tiptap-extensions/src/nodes/TodoItem.js @@ -29,39 +29,6 @@ export default class TodoItem extends Node {
`, - /* - The render function enables TodoItem to work in `runtimeonly` builds, - which is required for frameworks requiring strict CSP policies. For - example, doing this is required in Chrome Extensions. Having both - the template and the render function ensures there are no issues - converting the node to JSON and rendering the component. - */ - render(h) { - return h('li', { - attrs: { - 'data-type': this.node.type.name, - 'data-done': this.node.attrs.done.toString(), - 'data-drag-handle': '', - }, - }, [ - h('span', { - class: 'todo-checkbox', - attrs: { - contenteditable: false, - }, - on: { - click: this.onChange, - }, - }), - h('div', { - class: 'todo-content', - attrs: { - contenteditable: this.view.editable.toString(), - }, - ref: 'content', - }), - ]) - }, } }