Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Autocomplete in Shortcode possible? #120

Open
flow7 opened this issue Oct 16, 2023 · 1 comment
Open

Question: Autocomplete in Shortcode possible? #120

flow7 opened this issue Oct 16, 2023 · 1 comment

Comments

@flow7
Copy link

flow7 commented Oct 16, 2023

Hi All,

I'm trying to strengthen the connections between pages on my Grav-site and have different ideas on how to realise it. One option would be to use internal links - and someone pointed me to Shortcodes.

Would the folliwing be possible, in for instance a shortcode-based plugin for a separate code:

  1. User is on Admin site, edits a page/post. Adds the shortcode [intlink][/intlink].
  2. When typing inside the code [intlink] > .... - the editor autocompletes the text and provides a dropdown with links of already existing pages across the grav site. Similar to what happens when you type # #link in the github editor, it will provide links to other Issues.
  3. Lastly, on processing, this gets converted into a link to that specific page.

Would this be possible?
(I think the autocompletion part is key to making it easy for the users, in order to creating those links in the content.)
And a similar use-case pops when thinking about developing a [hashtag][/hashtag] code.

@flow7
Copy link
Author

flow7 commented Oct 16, 2023

Github implementation
Screenshot 2023-10-16 at 09 13 48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant