How to use the netlify-cms-ui-default.lengths.richTextEditorMinHeight function in netlify-cms-ui-default

To help you get started, we’ve selected a few netlify-cms-ui-default examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github netlify / netlify-cms / packages / netlify-cms-widget-markdown / src / MarkdownControl / VisualEditor.js View on Github external
import { Value, Document, Block, Text } from 'slate';
import { Editor as Slate } from 'slate-react';
import { lengths, fonts } from 'netlify-cms-ui-default';
import { editorStyleVars, EditorControlBar } from '../styles';
import { slateToMarkdown, markdownToSlate } from '../serializers';
import Toolbar from '../MarkdownControl/Toolbar';
import { renderBlock, renderInline, renderMark } from './renderers';
import plugins from './plugins/visual';
import schema from './schema';

const visualEditorStyles = `
  position: relative;
  overflow: hidden;
  overflow-x: auto;
  font-family: ${fonts.primary};
  min-height: ${lengths.richTextEditorMinHeight};
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: 0;
  margin-top: -${editorStyleVars.stickyDistanceBottom};
  padding: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
`;

const InsertionPoint = styled.div`
  flex: 1 1 auto;
  cursor: text;
`;

const createEmptyRawDoc = () => {
github netlify / netlify-cms / packages / netlify-cms-widget-markdown / src / MarkdownControl / RawEditor.js View on Github external
import { ClassNames } from '@emotion/core';
import { debounce } from 'lodash';
import { Editor as Slate, setEventTransfer } from 'slate-react';
import Plain from 'slate-plain-serializer';
import isHotkey from 'is-hotkey';
import { lengths, fonts } from 'netlify-cms-ui-default';
import { markdownToHtml } from '../serializers';
import { editorStyleVars, EditorControlBar } from '../styles';
import Toolbar from './Toolbar';

const styleStrings = {
  slateRaw: `
    position: relative;
    overflow: hidden;
    overflow-x: auto;
    min-height: ${lengths.richTextEditorMinHeight};
    font-family: ${fonts.mono};
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: 0;
    margin-top: -${editorStyleVars.stickyDistanceBottom};
  `,
};

const RawEditorContainer = styled.div`
  position: relative;
`;

export default class RawEditor extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
github netlify / netlify-cms / packages / netlify-cms-widget-markdown / src / MarkdownControl / visualEditorStyles.js View on Github external
import { colors, lengths, fonts } from 'netlify-cms-ui-default';
import { editorStyleVars } from '../styles';

export default `
  position: relative;
  overflow: hidden;
  overflow-x: auto;
  min-height: ${lengths.richTextEditorMinHeight};
  font-family: ${fonts.primary};
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: 0;
  margin-top: -${editorStyleVars.stickyDistanceBottom};

  h1 {
    font-size: 32px;
    margin-top: 16px;
  }

  h2 {
    font-size: 24px;
    margin-top: 12px;
  }