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

@@ -37,10 +37,10 @@ export default {
// <p>Example Text</p>
// `,
extensions: [
Document(),
Paragraph(),
Text(),
Collaboration({
Document,
Paragraph,
Text,
Collaboration.set({
provider: this.provider,
type: this.type,
}),

View File

@@ -38,14 +38,14 @@ export default {
// <p>Example Text</p>
// `,
extensions: [
Document(),
Paragraph(),
Text(),
Collaboration({
Document,
Paragraph,
Text,
Collaboration.set({
provider: this.provider,
type: this.type,
}),
CollaborationCursor({
CollaborationCursor.set({
provider: this.provider,
name: 'Cyndi Lauper',
color: '#f783ac',

View File

@@ -26,11 +26,11 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
Document(),
Paragraph(),
Text(),
Image(),
Dropcursor(),
Document,
Paragraph,
Text,
Image,
Dropcursor,
],
content: `
<p>Try to drag around the image. While you drag, the editor should show a decoration under your cursor. The so called dropcursor.</p>

View File

@@ -28,16 +28,16 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
Document(),
Paragraph(),
Text(),
Focus({
Document,
Paragraph,
Text,
Focus.set({
className: 'has-focus',
nested: true,
}),
Code(),
BulletList(),
ListItem(),
Code,
BulletList,
ListItem,
],
autoFocus: true,
content: `

View File

@@ -46,11 +46,11 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
Document(),
Paragraph(),
Text(),
TextStyle(),
FontFamily(),
Document,
Paragraph,
Text,
TextStyle,
FontFamily,
],
content: `
<p><span style="font-family: Inter">Did you know that Inter is a really nice font for interfaces?</span></p>

View File

@@ -26,11 +26,11 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
Document(),
Paragraph(),
Text(),
Image(),
Gapcursor(),
Document,
Paragraph,
Text,
Image,
Gapcursor,
],
content: `
<p>Try to set the cursor behind the image with your arrow keys! You should see big blinking cursor right from the image. This is the gapcursor.</p>

View File

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

View File

@@ -42,11 +42,11 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
Document(),
Paragraph(),
Text(),
Heading(),
TextAlign(),
Document,
Paragraph,
Text,
Heading,
TextAlign,
],
content: `
<h2>Heading</h2>

View File

@@ -25,10 +25,10 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
Document(),
Paragraph(),
Text(),
Typography(),
Document,
Paragraph,
Text,
Typography,
],
content: `
<p>“I have been suffering from Typomania all my life, a sickness that is incurable but not lethal.”</p>