Skip to content

Commit

Permalink
Extended widget API 'force' option to React and PlainJS
Browse files Browse the repository at this point in the history
  • Loading branch information
rsimon committed Aug 1, 2021
1 parent d2cc5f0 commit 541720b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/editor/widgets/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ export const getWidget = arg => {
// Plugin
if (force?.toLowerCase() === 'react') {
return React.createElement(widget, config);
} else if (force?.toLowerCase() === 'plainjs') {
return <WrappedWidget widget={widget} config={config} />
} else {
// Auto-detect
if (isReactComponent(widget)) {
Expand Down

0 comments on commit 541720b

Please sign in to comment.