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

Allow defining custom attachments without sgid #54

Closed
tonysm opened this issue Apr 9, 2024 · 0 comments · Fixed by #56
Closed

Allow defining custom attachments without sgid #54

tonysm opened this issue Apr 9, 2024 · 0 comments · Fixed by #56

Comments

@tonysm
Copy link
Owner

tonysm commented Apr 9, 2024

We need an extension point to allow creating custom attachments that don't require having an sgid... Possible syntax:

// In AppServiceProvider#boot
RichTextLaravel::withCustomAttachable(function (DOMElement $node) {
  if ($attachable = OpenGraph::fromNode($node)) {
    return $attachable;
  }
});

These "factories" would be used in the AttachableFactory::fromNode() here.

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

Successfully merging a pull request may close this issue.

1 participant