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 = (
8181 const start = to ,
8282 end = to ;
8383 const linkIcon = new HyperLinkIcon ( { at : start , url : urlStr , anchor } ) ;
84+ add ( from , to , Decoration . mark ( { class : 'cm-hyper-link-underline' } ) ) ;
8485 add ( start , end , Decoration . widget ( { widget : linkIcon , side : 1 } ) ) ;
8586 } ,
8687 } ) ;
@@ -130,6 +131,9 @@ export const hyperLinkStyle = EditorView.baseTheme({
130131 '.cm-hyper-link-icon svg' : {
131132 display : 'block' ,
132133 } ,
134+ '.cm-hyper-link-underline' : {
135+ textDecoration : 'underline' ,
136+ } ,
133137} ) ;
134138
135139export const hyperLink : Extension = [ hyperLinkExtension ( ) , hyperLinkStyle ] ;
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import { PageWarpper } from '..';
1111// regexp: /codemirror/gi,
1212// match: { codemirror: 'https://google.com' },
1313// handle: (value, input, from, to) => {
14- // if (value === 'Hyper ') return 'https://google.com';
14+ // if (value === 'codemirror ') return 'https://google.com';
1515// return value;
1616// },
1717// }),
@@ -20,7 +20,6 @@ import { PageWarpper } from '..';
2020
2121export const HyperLinkExample = ( ) => {
2222 const { theme } = useTheme ( ) ;
23-
2423 return (
2524 < PageWarpper >
2625 < CodeMirror
You can’t perform that action at this time.
0 commit comments