improve new extensions

This commit is contained in:
Philipp Kühn
2020-11-16 09:43:17 +01:00
parent 034ee139a3
commit c87f49c1fe
50 changed files with 296 additions and 377 deletions

View File

@@ -30,10 +30,10 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
Document(),
Paragraph(),
Text(),
Blockquote(),
Document,
Paragraph,
Text,
Blockquote,
],
content: `
<blockquote>

View File

@@ -31,11 +31,11 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
Document(),
Paragraph(),
Text(),
BulletList(),
ListItem(),
Document,
Paragraph,
Text,
BulletList,
ListItem,
],
content: `
<ul>

View File

@@ -30,10 +30,10 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
Document(),
Paragraph(),
Text(),
CodeBlock(),
Document,
Paragraph,
Text,
CodeBlock,
],
content: `
<p>

View File

@@ -25,9 +25,9 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
Document(),
Paragraph(),
Text(),
Document,
Paragraph,
Text,
],
content: `
<p>The Document extension is required. Though, you can write your own implementation, e. g. to give it custom name.</p>

View File

@@ -30,10 +30,10 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
Document(),
Paragraph(),
Text(),
HardBreak(),
Document,
Paragraph,
Text,
HardBreak,
],
content: `
<p>

View File

@@ -36,10 +36,10 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
Document(),
Paragraph(),
Text(),
Heading({
Document,
Paragraph,
Text,
Heading.set({
levels: [1, 2, 3],
}),
],

View File

@@ -30,10 +30,10 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
Document(),
Paragraph(),
Text(),
HorizontalRule(),
Document,
Paragraph,
Text,
HorizontalRule,
],
content: `
<p>This is a paragraph.</p>

View File

@@ -38,11 +38,11 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
Document(),
Paragraph(),
Text(),
Image(),
Dropcursor(),
Document,
Paragraph,
Text,
Image,
Dropcursor,
],
content: `
<p>This is a basic example of implementing images. Drag to re-order.</p>

View File

@@ -35,12 +35,12 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
Document(),
Paragraph(),
Text(),
BulletList(),
OrderedList(),
ListItem(),
Document,
Paragraph,
Text,
BulletList,
OrderedList,
ListItem,
],
content: `
<p>

View File

@@ -31,11 +31,11 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
Document(),
Paragraph(),
Text(),
OrderedList(),
ListItem(),
Document,
Paragraph,
Text,
OrderedList,
ListItem,
],
content: `
<ol>

View File

@@ -25,9 +25,9 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
Document(),
Paragraph(),
Text(),
Document,
Paragraph,
Text,
],
content: `
<p>The Paragraph extension is not required, but its very likely you want to use it. Its needed to write paragraphs of text. 🤓</p>

View File

@@ -27,11 +27,11 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
Document(),
Paragraph(),
Text(),
TaskList(),
TaskItem(),
Document,
Paragraph,
Text,
TaskList,
TaskItem,
],
content: `
<ul data-type="task_list">

View File

@@ -31,11 +31,11 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
Document(),
Paragraph(),
Text(),
TaskList(),
TaskItem(),
Document,
Paragraph,
Text,
TaskList,
TaskItem,
],
content: `
<ul data-type="task_list">

View File

@@ -25,9 +25,9 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
Document(),
Paragraph(),
Text(),
Document,
Paragraph,
Text,
],
content: `
<p>The Text extension is required, at least if you want to have text in your text editor and thats very likely.</p>