Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Wanted to finally contribute something to oss, so I added the option to use attributes/variables to shortcodes.
For each snippet is a tag-like selector which forces you to select what variables to use in the script and shortcode (otherwise any shortcode user could overwrite any variables in the whole function).
Let me know if there's anything else to change.
References: #27
P.S.: I think the last Commit didn't run as
npx mix --production
but commited the samewatch
. That's why there's a ton of removals. Probably all the whitespace in app.jsGithub Copilot Summary
This pull request introduces functionality for handling shortcode attributes in snippets. The changes span multiple files, adding new methods and updating existing ones to support this feature.
Shortcode Attributes Handling:
app/Helpers/Helper.php
: Addedshortcode_attributes
to the list of fields.app/Hooks/Handlers/AdminMenuHandler.php
: Updated therender
method to retrieve and passshortcode_attributes
to the view. [1] [2]app/Hooks/Handlers/CodeHandler.php
: Enhanced thehandleShortcode
method to validate and process shortcode attributes. [1] [2]app/Model/Snippet.php
: AddedgetAllShortcodeAttributes
method and updatedparseBlock
andparseInputMeta
methods to handleshortcode_attributes
. [1] [2] [3]Frontend Components:
src/components/_ShortcodeAttributeCreator.vue
: Introduced a new component to create and manage shortcode attributes.src/components/_SnippetForm.vue
: IntegratedShortcodeAttributeCreator
into the snippet form to allow users to define shortcode attributes. [1] [2]