kopia lustrzana https://github.com/wagtail/wagtail
Remove unused strategy API from Draftail registry
rodzic
5b2c04411b
commit
37316656f7
|
@ -51,7 +51,6 @@ export const initEditor = (fieldName, options = {}) => {
|
|||
entityTypes = options.entityTypes.map(wrapWagtailIcon).map(type =>
|
||||
Object.assign(type, {
|
||||
source: registry.getSource(type.source),
|
||||
strategy: registry.getStrategy(type.type) || null,
|
||||
decorator: registry.getDecorator(type.decorator),
|
||||
block: registry.getBlock(type.block),
|
||||
})
|
||||
|
|
|
@ -2,7 +2,6 @@ const registry = {
|
|||
decorators: {},
|
||||
blocks: {},
|
||||
sources: {},
|
||||
strategies: {},
|
||||
};
|
||||
|
||||
const registerDecorators = (decorators) => {
|
||||
|
@ -23,12 +22,6 @@ const registerSources = (sources) => {
|
|||
|
||||
const getSource = name => registry.sources[name];
|
||||
|
||||
const registerStrategies = (strategies) => {
|
||||
Object.assign(registry.strategies, strategies);
|
||||
};
|
||||
|
||||
const getStrategy = name => registry.strategies[name];
|
||||
|
||||
export default {
|
||||
registerDecorators,
|
||||
getDecorator,
|
||||
|
@ -36,6 +29,4 @@ export default {
|
|||
getBlock,
|
||||
registerSources,
|
||||
getSource,
|
||||
registerStrategies,
|
||||
getStrategy,
|
||||
};
|
||||
|
|
Ładowanie…
Reference in New Issue