Allowing to add properties for integration with other CMS
See original GitHub issueFeature Description
While trying to integrate core story-editor
with other CMS I found that it is not necessary that every CMS will provide a MediaModal
like WordPress does, there may be instances where we might need to pass down some props via CMS-story-editor
which will allow invoking MediaModal
of that CMS.
Some places that might need this:
https://github.com/google/web-stories-wp/blob/91d7271af6a7f17b42e0be4bbaef5332fecd7170/packages/story-editor/src/app/highlights/quickActions/useQuickActions.js#L187-L198
https://github.com/google/web-stories-wp/blob/76f20d3303a44ef5a4092dde4971acf55b2b7f77/packages/story-editor/src/components/form/media.js#L101-L127
https://github.com/google/web-stories-wp/blob/25d43b402e39f46de36ec4636a1893f8749b932e/packages/story-editor/src/components/library/panes/media/local/mediaPane.js#L297-L310
https://github.com/google/web-stories-wp/blob/25d43b402e39f46de36ec4636a1893f8749b932e/packages/story-editor/src/components/library/panes/media/local/mediaPane.js#L312-L324
https://github.com/google/web-stories-wp/blob/76f20d3303a44ef5a4092dde4971acf55b2b7f77/packages/story-editor/src/components/panels/design/captions/captions.js#L153-L172
https://github.com/google/web-stories-wp/blob/c210a3c9307a224ed800551c04df93e3b066a0ac/packages/story-editor/src/components/panels/shared/backgroundAudioPanelContent.js#L82-L94
Alternatives Considered
Additional Context
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
@swissspidy Due to some issue,
bootstrap.Modal
wasn’t showing before when I checked, but now I see that it’s globally available to use. So I was able to open the modal usingbootstrap.Modal
. So extra attributes aren’t required.I’m still not sure how good of an idea it is to allow injecting random attributes to support this use case 🤔 But seems like it’s the most viable option.
@sayedtaqui @choumx any thoughts on this?