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

Add a Slashmenu to DA #291

Merged
merged 7 commits into from
Dec 13, 2024
Merged

Add a Slashmenu to DA #291

merged 7 commits into from
Dec 13, 2024

Conversation

chrischrischris
Copy link
Contributor

@chrischrischris chrischrischris commented Dec 12, 2024

Pressing / at the beginning of a line brings up a notion like inline menu. User can continue to type to filter or use arrow keys / mouse to select item.

Menu items are defined in slashMenuItems.js. They are defined with a simple object:

  {
    // Title - Should not contain spaces
    title: 'Title-to-display',
    // Callback function when item is selected.  Will pass in: (state, dispatch, argument)
    command: cmdFn,
    // class to assign the item, used for adding an icon
    class: 'lorem-ipsum',
    // If an argument is to be passed in this must be set to true
    argument: true,
  }

Note that plugins only support a single argument, but users could easily pass in a comma delimited string for multiple args.

Also includes a basic Lorem Ipsum plugin originally written by @sabyamon . Is currently the only plugin that takes an argument: /lor 3 will generate 3 lines of Lorem Ipsum.

Fixes #55

chrischrischris and others added 3 commits December 11, 2024 14:43
Co-authored-by: Chris Peyer <chrischrischris@users.noreply.github.com>
Copy link

aem-code-sync bot commented Dec 12, 2024

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

@auniverseaway auniverseaway merged commit 7cd70c6 into main Dec 13, 2024
5 of 6 checks passed
@auniverseaway auniverseaway deleted the slashmenu branch December 13, 2024 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inline Block Creation
3 participants