Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've opened #1883278: Integrate with WYSIWYG editors (Insert?) against Fill PDF. Fill PDF doesn't currently provide any fields, so wondering what the best way to integrate would be. It seems like adding a field would get me the most free. Are there any other hooks/APIs I should look at if I want to basically expose a custom hyperlink creation interface? Is integrating with Insert the wrong way to go here? I'm thinking about it and hoping to get more tested WYSIWYG editor support for free too, rather than rolling my own.
Comments
Comment #1
Snater CreditAttribution: Snater commentedI am browsing through old issues while working on the module's D8 version.
As for D7,
hook_insert_widgets
needs to be implemented for supplying the widget info,hook_insert_styles
for supplying a custom style, andhook_insert_content
for rendering that style. See insert.inc and file.inc. Finally, in JS, an event handler needs to be set up listening toinsertIntoActiveEditor
triggered on the insert button node. The handler would be responsible for replacing individual placeholders set up in the custom template, registered byhook_theme
and rendered byhook_insert_content
as mentioned above. I think that should be the basics.In D8, the interface will likely be a bit more flexible. All necessary information on how to interface to Insert should be an outcome of #2994066: Create interface for other modules, so I tend to close this ticket if there are no more questions. (I acknowledge it has been a while since this ticket was created.)
Comment #2
wizonesolutionsHaha, yes, closing.