securingsincity / react-ace

React Ace Component
http://securingsincity.github.io/react-ace/
MIT License
3.99k stars 603 forks source link

Problem with wrapping #770

Open jpogadl opened 4 years ago

jpogadl commented 4 years ago

Problem

Hi, I have some issue with wrap text in ace editor. I have editor with fix width and html with long text in rows. I need wrap this rows and on each wrapped row i see "    ". Please, exists some solution for removing this indent? thx.

image

Sample code to reproduce your issue

<AceEditor
    mode="html"
    theme="tomorrow"
    fontSize={14}
    showPrintMargin={false}
    showGutter={false}
    highlightActiveLine={false}
    value={'<h1>Random Quote Generator</h1>\n' +
    '<div class="white-box">\n' +
    'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse rhoncus suscipit arcu quis ultricies. Nullam euismod libero semper, tempus risus vel, mattis orci. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeo.\n' +
    '</div'}
    width={'632px'}
    wrapEnabled={true}
    tabSize={0}
    setOptions={{
        enableBasicAutocompletion: false,
        enableLiveAutocompletion: false,
        enableSnippets: false,
        showLineNumbers: false,
        useSoftTabs: true,
    }}
/>

References

Progress on: #

0x74616e67 commented 3 years ago

I found a solution here, may resolve this issue: https://stackoverflow.com/questions/38323427/remove-word-wrap-offset-in-ace-editor