|
@@ -8,8 +8,8 @@ import GrowiRenderer from './util/GrowiRenderer';
|
|
|
import HeaderSearchBox from './components/HeaderSearchBox';
|
|
import HeaderSearchBox from './components/HeaderSearchBox';
|
|
|
import SearchPage from './components/SearchPage';
|
|
import SearchPage from './components/SearchPage';
|
|
|
import PageEditor from './components/PageEditor';
|
|
import PageEditor from './components/PageEditor';
|
|
|
-import EditorOptionsSelector from './components/PageEditor/EditorOptionsSelector';
|
|
|
|
|
-import { EditorOptions, PreviewOptions } from './components/PageEditor/EditorOptionsSelector';
|
|
|
|
|
|
|
+import OptionsSelector from './components/PageEditor/OptionsSelector';
|
|
|
|
|
+import { EditorOptions, PreviewOptions } from './components/PageEditor/OptionsSelector';
|
|
|
import PageListSearch from './components/PageListSearch';
|
|
import PageListSearch from './components/PageListSearch';
|
|
|
import PageHistory from './components/PageHistory';
|
|
import PageHistory from './components/PageHistory';
|
|
|
import PageComments from './components/PageComments';
|
|
import PageComments from './components/PageComments';
|
|
@@ -133,16 +133,16 @@ if (pageEditorElem) {
|
|
|
crowi.setPageEditor(pageEditor);
|
|
crowi.setPageEditor(pageEditor);
|
|
|
}
|
|
}
|
|
|
// render EditorOptionsSelector
|
|
// render EditorOptionsSelector
|
|
|
-const editorOptionSelectorElem = document.getElementById('page-editor-options-selector');
|
|
|
|
|
-if (editorOptionSelectorElem) {
|
|
|
|
|
|
|
+const pageEditorOptionsSelectorElem = document.getElementById('page-editor-options-selector');
|
|
|
|
|
+if (pageEditorOptionsSelectorElem) {
|
|
|
const editorOptions = new EditorOptions(crowi.editorOptions);
|
|
const editorOptions = new EditorOptions(crowi.editorOptions);
|
|
|
ReactDOM.render(
|
|
ReactDOM.render(
|
|
|
- <EditorOptionsSelector editorOptions={editorOptions}
|
|
|
|
|
|
|
+ <OptionsSelector editorOptions={editorOptions}
|
|
|
onChange={(newEditorOptions, newPreviewOptions) => { // set onChange event handler
|
|
onChange={(newEditorOptions, newPreviewOptions) => { // set onChange event handler
|
|
|
pageEditor.setEditorOptions(newEditorOptions);
|
|
pageEditor.setEditorOptions(newEditorOptions);
|
|
|
crowi.saveEditorOptions(newEditorOptions);
|
|
crowi.saveEditorOptions(newEditorOptions);
|
|
|
}} />,
|
|
}} />,
|
|
|
- editorOptionSelectorElem
|
|
|
|
|
|
|
+ pageEditorOptionsSelectorElem
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|