Skip to content

Commit

Permalink
getPreviewHtml()
Browse files Browse the repository at this point in the history
  • Loading branch information
hueitan committed Nov 30, 2023
1 parent cea0e51 commit fec2068
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/link/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from '@wordpress/element';
import { useAnchor } from '@wordpress/rich-text';
import { __ } from '@wordpress/i18n';
import { getPreviewHtml } from 'wikipedia-preview';
import wikipediaPreview from 'wikipedia-preview';
import { isTextNearTheEdge } from './utils';

export const PreviewEditUI = ({
Expand Down Expand Up @@ -41,7 +41,7 @@ export const PreviewEditUI = ({
useEffect(() => {
const { title, lang } = activeAttributes;
if (title && lang) {
getPreviewHtml(title, lang, (preview) => {
wikipediaPreview.getPreviewHtml(title, lang, (preview) => {
setPreviewHtml(preview);
});
}
Expand Down

0 comments on commit fec2068

Please sign in to comment.