File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
extensions/hyper-link/src
www/src/pages/extensions/hyper-link Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ const linkDecorator = (
81
81
const start = to ,
82
82
end = to ;
83
83
const linkIcon = new HyperLinkIcon ( { at : start , url : urlStr , anchor } ) ;
84
+ add ( from , to , Decoration . mark ( { class : 'cm-hyper-link-underline' } ) ) ;
84
85
add ( start , end , Decoration . widget ( { widget : linkIcon , side : 1 } ) ) ;
85
86
} ,
86
87
} ) ;
@@ -130,6 +131,9 @@ export const hyperLinkStyle = EditorView.baseTheme({
130
131
'.cm-hyper-link-icon svg' : {
131
132
display : 'block' ,
132
133
} ,
134
+ '.cm-hyper-link-underline' : {
135
+ textDecoration : 'underline' ,
136
+ } ,
133
137
} ) ;
134
138
135
139
export const hyperLink : Extension = [ hyperLinkExtension ( ) , hyperLinkStyle ] ;
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import { PageWarpper } from '..';
11
11
// regexp: /codemirror/gi,
12
12
// match: { codemirror: 'https://google.com' },
13
13
// handle: (value, input, from, to) => {
14
- // if (value === 'Hyper ') return 'https://google.com';
14
+ // if (value === 'codemirror ') return 'https://google.com';
15
15
// return value;
16
16
// },
17
17
// }),
@@ -20,7 +20,6 @@ import { PageWarpper } from '..';
20
20
21
21
export const HyperLinkExample = ( ) => {
22
22
const { theme } = useTheme ( ) ;
23
-
24
23
return (
25
24
< PageWarpper >
26
25
< CodeMirror
You can’t perform that action at this time.
0 commit comments