You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.rst
+8-8
Original file line number
Diff line number
Diff line change
@@ -100,7 +100,7 @@ file as well to define its plugin slots.
100
100
// env.config.js
101
101
102
102
import { DIRECT_PLUGIN, IFRAME_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';
103
-
103
+
104
104
// import any additional dependencies or functions to be used for each plugin operation
105
105
import Sidebar from './widgets/social/Sidebar';
106
106
import SocialMediaLink from './widgets/social/SocialMediaLink';
@@ -168,12 +168,12 @@ If you need to use a plugin operation (e.g. Wrap, Hide, Modify) on default conte
168
168
Note: The default content will have a priority of 50, allowing for any plugins to appear before or after the default content.
169
169
170
170
Plugin Operations
171
-
=================
171
+
`````````````````
172
172
173
173
There are four plugin operations that each require specific properties.
174
174
175
175
Insert a Direct Plugin
176
-
``````````````````````
176
+
''''''''''''''''''''''
177
177
178
178
The Insert operation will add a widget in the plugin slot. The contents required for a Direct Plugin is the same as
179
179
is demonstrated in the Default Contents section above, with the ``content`` key being optional.
@@ -196,7 +196,7 @@ is demonstrated in the Default Contents section above, with the ``content`` key
196
196
}
197
197
198
198
Insert an iFrame Plugin
199
-
```````````````````````
199
+
'''''''''''''''''''''''
200
200
201
201
The Insert operation will add a widget in the plugin slot. The contents required for an iFrame Plugin is the same as
202
202
is demonstrated in the Default Contents section above.
@@ -220,7 +220,7 @@ is demonstrated in the Default Contents section above.
220
220
}
221
221
222
222
Modify
223
-
``````
223
+
''''''
224
224
225
225
The Modify operation allows us to modify the contents of a widget, including its id, type, content, RenderWidget function,
226
226
or its priority. The operation requires the id of the widget that will be modified and a function to make those changes.
@@ -248,7 +248,7 @@ or its priority. The operation requires the id of the widget that will be modifi
248
248
}
249
249
250
250
Wrap
251
-
````
251
+
''''
252
252
253
253
Unlike Modify, the Wrap operation adds a React component around the widget, and a single widget can receive more than
254
254
one wrap operation. Each wrapper function takes in a ``component`` and ``id`` prop.
@@ -276,7 +276,7 @@ one wrap operation. Each wrapper function takes in a ``component`` and ``id`` pr
276
276
}
277
277
278
278
Hide
279
-
````
279
+
''''
280
280
281
281
The Hide operation will simply hide whatever content is desired. This is generally used for the default content.
282
282
@@ -304,7 +304,7 @@ Fallback Behavior
304
304
-----------------
305
305
306
306
Setting a Fallback component
307
-
''''''''''''''''''''''''''''
307
+
````````````````````````````
308
308
The two main places to configure a fallback component for a given implementation are in the PluginSlot props and in the JS configuration. The JS configuration fallback will be prioritized over the PluginSlot props fallback.
0 commit comments