While the basic Gutenburg custom format allows adding a preview without leaving the WordPress editing experience, the editor has to know the exact title of the article they want to add. For disambiguation or other reasons, article are often not named with the exact word(s) we would guess. This can cause waste of time and the impression that the concept they want to link to is not present on Wikipedia.
Add article title search/autocomplete to the article title field of the custom format form.
- Uses prefix search to display a list of possible articles after each typed character.
- Shows article title, description, and thumbnail.
- Very similar to search bar on Wikipedia.
- Typing the full title of an article has the same effect as selecting it from the list.
- Search within article if text in search field does not match any page/article title.
- Search bar is in active state whether user selects the word for preview or opens the Wikipedia Preview custom form without selecting any word.
- Expand the height of menu based on the search results.
- Hovering search result list will show with a Base80(#EAECF0) background.
- Preview gets added when a user selects any of the search results.
- Clear icon removes the typed query.
- Scrollbar appears while search list goes past the menu size.
- Press outside the search window to close it down.
- Show image placeholder as a thumbnail for results without lead image.
- Exclude showing disambiguation pages.
- Article title can go upto two lines.
- End article description with (...) if it goes past the defined limit.
|No word selection||Searching Wikipedia||Selecting Preview||Preview added|
|Word selected||Selecting Preview||Preview added|