Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Leecason committed Dec 28, 2019
2 parents 0d1bc8e + 2b9a42f commit 36f436d
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 20 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ All available extensions:
- `Indent`
- `LineHeight`
- `HorizontalRule`
- `HardBreak`
- `TrailingNode`
- `History`

Expand Down
34 changes: 18 additions & 16 deletions examples/views/Basic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import {
TextAlign,
Indent,
LineHeight,
HardBreak,
HorizontalRule,
TrailingNode,
History,
Expand Down Expand Up @@ -59,14 +60,15 @@ export default {
new TodoItem(),
new TodoList(),
new Indent(),
new HardBreak(),
new HorizontalRule(),
new TrailingNode(),
new History(),
],
content: `
<h1 data-text-align="center"">Element Tiptap Editor</h1>
<p data-text-align="center"">
<h1 data-text-align="center">Element Tiptap Editor</h1>
<p data-text-align="center">
<strong>
The editor is based on&nbsp;
<a href="https://github.com/scrumpy/tiptap" rel="noopener noreferrer nofollow">Tiptap</a>&nbsp;
Expand All @@ -75,10 +77,10 @@ export default {
components.&nbsp;
</strong>
</p>
<p"></p>
<p">
<p></p>
<p>
Text can be decorated with <strong>Bold</strong>, <u>Underline</u>, <em>Italic</em>, <s>Strikethrough</s> or <strong><u><em><s>both</s></em></u></strong>.</p>
<p data-text-align="right"">
<p data-text-align="right">
Align text to right.
</p>
<ul>
Expand All @@ -89,48 +91,48 @@ export default {
<p>With regular items</p>
</li>
</ul>
<p"></p>
<p">
<p></p>
<p>
Images:
</p>
<p data-text-align="center"">
<p data-text-align="center">
<img src="https://66.media.tumblr.com/dcd3d24b79d78a3ee0f9192246e727f1/tumblr_o00xgqMhPM1qak053o1_400.gif" width="200" height="200">
</p>
<ul data-type="todo_list">
<li data-type="todo_item" data-done="false">
<span class="todo-checkbox" contenteditable="false"></span>
<div class="todo-content">
<p">
<p>
something to do
</p>
</div>
</li>
<li data-type="todo_item" data-done="true">
<span class="todo-checkbox" contenteditable="false"></span>
<div class="todo-content">
<p">
<p>
something has done
</p>
</div>
</li>
</ul>
<p"></p>
<p></p>
<pre><code>Hello World!</code></pre>
<p"></p>
<p">
<p></p>
<p>
You can also use keyboard shortcuts for
<strong>Undo</strong>
or
<strong>Redo</strong> your changes.
(<strong>cmd+z</strong> and <strong>cmd+shift+z</strong>).
</p>
<p"></p>
<p></p>
<blockquote>
<p">
<p>
This editor is awesome. 👍👍🏻👍🏼👍🏽👍🏾👍🏿
</p>
</blockquote>
<p"></p>
<p></p>
`,
};
},
Expand Down
2 changes: 2 additions & 0 deletions examples/views/MenuBubble.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
TodoList,
TextAlign,
Indent,
HardBreak,
LineHeight,
HorizontalRule,
TrailingNode,
Expand Down Expand Up @@ -59,6 +60,7 @@ export default {
new TodoItem(),
new TodoList(),
new Indent({ bubble: true }),
new HardBreak(),
new HorizontalRule(),
new TrailingNode(),
new History(),
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@
"vue-template-compiler": "^2.6.10"
},
"peerDependencies": {
"element-ui": "^2.13.0",
"vue": "^2.6.0",
"vue-awesome": "^4.0.2"
"vue": "^2.6.0"
},
"gitHooks": {
"pre-commit": "lint-staged"
Expand Down
1 change: 1 addition & 0 deletions src/components/ElementTiptap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ export default {
flex-grow: 1;
overflow: auto;
padding: 5px;
text-align: left;
}
.ProseMirror {
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/heading.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ParagraphNodeSpec, getParagraphNodeAttrs, toParagraphDOM } from './para
function getAttrs (dom) {
const attrs = getParagraphNodeAttrs(dom);
const level = dom.nodeName.match(/[H|h](\d)/)[1];
attrs.level = level;
attrs.level = Number(level);
return attrs;
}

Expand Down
1 change: 1 addition & 0 deletions src/extensions/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export { Doc, Text } from 'tiptap';

export {
HardBreak,
TrailingNode,
Placeholder,
} from 'tiptap-extensions';
Expand Down

0 comments on commit 36f436d

Please sign in to comment.