Skip to content

Question: Autocomplete in Shortcode possible? #120

@flow7

Description

@flow7

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions