Browse Source

Add custom option to SelectorManager

pull/3901/head
Artur Arseniev 4 years ago
parent
commit
859f885e9f
  1. 4
      docs/modules/Selectors.md
  2. 5
      src/selector_manager/config/config.js

4
docs/modules/Selectors.md

@ -112,9 +112,13 @@ If you need to manage your selectors programmatically you can use its [APIs][Sel
The default UI can handle most of the common tasks but in case you need a more advanced logic/elements, that requires a replace of the default UI.
All you have to do is to indicate the editor your intent to use a custom UI and then subscribe to the `block:custom` event that will give you all the information on any requested change.
In the example below we'll replicate most of the default functionality by using only the Selector Manager API.
## Events

5
src/selector_manager/config/config.js

@ -98,5 +98,8 @@ export default {
// With this option enabled, also in the second case, the Component will be passed.
// This method allows to avoid styling classes directly and make, for example, some
// unintended changes below the visible canvas area (when components share same classes)
componentFirst: 0
componentFirst: 0,
// Avoid rendering the default Selector Manager UI.
custom: false
};

Loading…
Cancel
Save