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

Break long lines #22

Closed
bernhardh opened this issue Jun 13, 2019 · 8 comments
Closed

Break long lines #22

bernhardh opened this issue Jun 13, 2019 · 8 comments

Comments

@bernhardh
Copy link

If the code is very long, without linebreak, it will exceed the line. Is there a way, to autobreak (word-break?) it?

Example:
https://codepen.io/anon/pen/MMabjY

The expected behavior would be:
image

@koca
Copy link
Owner

koca commented Aug 14, 2019

Did you fixed it? I don't see any issue here.

@koca
Copy link
Owner

koca commented Aug 14, 2019

Oh sorry you want support for word wrap. Not sure if we can support this anytime soon because we should also be thinking about the linenumbers etc.

@bernhardh
Copy link
Author

I totally understand that. But as you can see, these long lines are really hard to read and its even harder to modify the code inside.

@koca
Copy link
Owner

koca commented Aug 14, 2019

I agree. But word wraps also makes the code hard to scan... You can't follow where's the line break, indentation etc.
What's your use case? What kind of data you have? I mean you are having this issue just because you don't have enough space on mobile?

@bernhardh
Copy link
Author

Sorry for late answer. The usecase is the following:

I am using a wysiwyg editor (tiptap) for editing website content. This editor (like most others) doesn't add linebreaks in the result HTML, which is stored into the database.

I also want to edit this data as plain html, so I thought, I can use prism for it. But the problem is, that I have for example a 600 words long text plus html, without linebreak. So prism is useless in this situation, without word wrap.

@bernhardh
Copy link
Author

Sry. for doublepost.

But please have a look at the example:

image

@tomgalpin
Copy link

I have the same question/issue.
I was looking into trying to add this plugin:
https://prismjs.com/plugins/normalize-whitespace/

Do you have a recommendation on how to implement with vue-prism-editor?

@koca
Copy link
Owner

koca commented Apr 6, 2020

@tomgalpin we don't support prism plugins.

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