File tree Expand file tree Collapse file tree 6 files changed +66
-4
lines changed
dialtone-vue2/components/rich_text_editor
dialtone-vue3/components/rich_text_editor Expand file tree Collapse file tree 6 files changed +66
-4
lines changed Original file line number Diff line number Diff line change
1
+ import Image from '@tiptap/extension-image' ;
2
+
3
+ export const ConfigurableImage = Image . extend ( {
4
+ name : 'ConfigurableImage' ,
5
+
6
+ addAttributes ( ) {
7
+ return {
8
+ src : {
9
+ default : '' ,
10
+ } ,
11
+ alt : {
12
+ default : undefined ,
13
+ } ,
14
+ title : {
15
+ default : undefined ,
16
+ } ,
17
+ width : {
18
+ default : undefined ,
19
+ } ,
20
+ height : {
21
+ default : undefined ,
22
+ } ,
23
+ style : {
24
+ default : undefined ,
25
+ } ,
26
+ } ;
27
+ } ,
28
+ } ) . configure ( { inline : true } ) ;
Original file line number Diff line number Diff line change
1
+ import { ConfigurableImage } from './image' ;
2
+
3
+ export default ConfigurableImage ;
Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ import Placeholder from '@tiptap/extension-placeholder';
20
20
import HardBreak from ' @tiptap/extension-hard-break' ;
21
21
import Bold from ' @tiptap/extension-bold' ;
22
22
import BulletList from ' @tiptap/extension-bullet-list' ;
23
- import Image from ' @tiptap/extension-image' ;
24
23
import Italic from ' @tiptap/extension-italic' ;
25
24
import TipTapLink from ' @tiptap/extension-link' ;
26
25
import ListItem from ' @tiptap/extension-list-item' ;
@@ -32,6 +31,7 @@ import TextAlign from '@tiptap/extension-text-align';
32
31
import History from ' @tiptap/extension-history' ;
33
32
import Emoji from ' ./extensions/emoji' ;
34
33
import CustomLink from ' ./extensions/custom_link' ;
34
+ import ConfigurableImage from ' ./extensions/image' ;
35
35
import { MentionPlugin } from ' ./extensions/mentions/mention' ;
36
36
import { ChannelPlugin } from ' ./extensions/channels/channel' ;
37
37
import { SlashCommandPlugin } from ' ./extensions/slash_command/slash_command' ;
@@ -465,7 +465,7 @@ export default {
465
465
}
466
466
467
467
if (this .allowInlineImages ) {
468
- extensions .push (Image . configure ({ inline : true }) );
468
+ extensions .push (ConfigurableImage );
469
469
}
470
470
471
471
if (this .additionalExtensions .length ) {
Original file line number Diff line number Diff line change
1
+ import Image from '@tiptap/extension-image' ;
2
+
3
+ export const ConfigurableImage = Image . extend ( {
4
+ name : 'ConfigurableImage' ,
5
+
6
+ addAttributes ( ) {
7
+ return {
8
+ src : {
9
+ default : '' ,
10
+ } ,
11
+ alt : {
12
+ default : undefined ,
13
+ } ,
14
+ title : {
15
+ default : undefined ,
16
+ } ,
17
+ width : {
18
+ default : undefined ,
19
+ } ,
20
+ height : {
21
+ default : undefined ,
22
+ } ,
23
+ style : {
24
+ default : undefined ,
25
+ } ,
26
+ } ;
27
+ } ,
28
+ } ) . configure ( { inline : true } ) ;
Original file line number Diff line number Diff line change
1
+ import { ConfigurableImage } from './image' ;
2
+
3
+ export default ConfigurableImage ;
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ import Blockquote from '@tiptap/extension-blockquote';
16
16
import CodeBlock from ' @tiptap/extension-code-block' ;
17
17
import Document from ' @tiptap/extension-document' ;
18
18
import HardBreak from ' @tiptap/extension-hard-break' ;
19
- import Image from ' @tiptap/extension-image' ;
20
19
import Paragraph from ' @tiptap/extension-paragraph' ;
21
20
import Placeholder from ' @tiptap/extension-placeholder' ;
22
21
import Bold from ' @tiptap/extension-bold' ;
@@ -32,6 +31,7 @@ import TextAlign from '@tiptap/extension-text-align';
32
31
import History from ' @tiptap/extension-history' ;
33
32
import Emoji from ' ./extensions/emoji' ;
34
33
import CustomLink from ' ./extensions/custom_link' ;
34
+ import ConfigurableImage from ' ./extensions/image' ;
35
35
import { MentionPlugin } from ' ./extensions/mentions/mention' ;
36
36
import { ChannelPlugin } from ' ./extensions/channels/channel' ;
37
37
import { SlashCommandPlugin } from ' ./extensions/slash_command/slash_command' ;
@@ -465,7 +465,7 @@ export default {
465
465
}
466
466
467
467
if (this .allowInlineImages ) {
468
- extensions .push (Image . configure ({ inline : true }) );
468
+ extensions .push (ConfigurableImage );
469
469
}
470
470
471
471
if (this .additionalExtensions .length ) {
You can’t perform that action at this time.
0 commit comments