Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i have a question that i want to preserve multiple space when i use quill, so i set .ql-editor{ white-space:pre},but it doesn't work, then i tried to set {white-space: pre-line}, unbelievable, it works!! i am confused #2459

Closed
rtlly opened this issue Jan 10, 2019 · 2 comments

Comments

@rtlly
Copy link

rtlly commented Jan 10, 2019

Please describe the a concise description and fill out the details below. It will help others efficiently understand your request and get to an answer instead of repeated back and forth. Providing a minimal, complete and verifiable example will further increase your chances that someone can help.

Steps for Reproduction

  1. Visit [quilljs.com, jsfiddle.net, codepen.io]
  2. Step Two
  3. Step Three

Expected behavior:

Actual behavior:

Platforms:

Include browser, operating system and respective versions

Version:

Run Quill.version to find out

@japrogramer
Copy link

I have the same problem except neither solution works,
my problem is that i can only one type word or letter per line

image

firefox 65.0

import React from 'react';
import ReactQuill from 'react-quill';
import 'react-quill/dist/quill.snow.css';
import './Editor.css';

const MyEditor =  (props) => {

  const [Text, setText] = React.useState('');

  return (
    <ReactQuill value={Text} onChange={setText} preserveWhitespace={true} />
  )
}

export default MyEditor;
.ql-editor {
white-space: pre-line!important;

}
{
  "name": "frontend",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@material-ui/core": "^3.9.2",
    "@material-ui/icons": "^3.0.2",
    "@material-ui/styles": "^3.0.0-alpha.10",
    "apollo-boost": "^0.1.23",
    "apollo-link-ws": "^1.0.12",
    "apollo-upload-client": "^10.0.0",
    "graphql": "^14.1.0",
    "react": "^16.8.1",
    "react-apollo": "^2.4.1",
    "react-cache": "^2.0.0-alpha.1",
    "react-dom": "^16.8.1",
    "react-ga": "^2.5.7",
    "react-quill": "^1.3.3",
    "react-scripts": "2.1.3",
    "subscriptions-transport-ws": "^0.9.15"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": [
    ">0.2%",
    "not dead",
    "not ie <= 11",
    "not op_mini all"
  ]
}

@benbro
Copy link
Contributor

benbro commented Mar 15, 2019

Duplicate:
#1751 (comment)
#1752

@benbro benbro closed this as completed Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants