mirror of
https://github.com/aljazceru/landscape-template.git
synced 2026-01-21 07:14:29 +01:00
feat: PostTypesLIst component, create Post Page, text-editor enable link
This commit is contained in:
@@ -41,7 +41,7 @@ export default function TextEditor({ placeholder, initialContent }: Props) {
|
||||
const linkExtension = useMemo(() => {
|
||||
const extension = new LinkExtension({ autoLink: true });
|
||||
extension.addHandler('onClick', (_, data) => {
|
||||
alert(`You clicked link: ${JSON.stringify(data)}`);
|
||||
window.open(data.href, '_blank')?.focus();
|
||||
return true;
|
||||
});
|
||||
return extension;
|
||||
|
||||
Reference in New Issue
Block a user