Expose methods for installations to create custom preview components

This commit is contained in:
Mathias Biilmann Christensen
2016-09-11 17:53:44 +02:00
parent c51f42658e
commit 8d63ff0a88
8 changed files with 77 additions and 12 deletions

View File

@ -2,6 +2,7 @@ import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { Router } from 'react-router';
import { registerPreviewStyle,registerPreviewTemplate } from './lib/registry';
import configureStore from './store/configureStore';
import routes from './routing/routes';
import history, { syncHistory } from './routing/history';
@ -29,3 +30,8 @@ render((
</Plugin>
</Provider>
), el);
window.CMS = {
registerPreviewStyle: registerPreviewStyle,
registerPreviewTemplate: registerPreviewTemplate
};