import { Dropdown, DropdownItem } from '@/components/Dropdown'; import { PreferencesGroup, PreferencesSegment, Subtitle, Text, Title, } from '@/preferences/components'; import { WebApplication } from '@/ui_models/application'; import { ComponentArea } from '@standardnotes/snjs'; import { FunctionComponent } from 'preact'; import { useEffect, useState } from 'preact/hooks'; type Props = { application: WebApplication; }; export const Defaults: FunctionComponent = ({ application }) => { const [editorItems, setEditorItems] = useState([]); useEffect(() => { const editors = application.componentManager .componentsForArea(ComponentArea.Editor) .map((editor) => { return { label: editor.name, value: editor.package_info.identifier, }; }); setEditorItems([ { label: 'Plain Editor', value: 'plain-editor', }, ...editors, ]); }, [application]); return ( Defaults
Default Editor New notes will be created using this editor.
); };