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

Plain text editing #123

Closed
ho1ger opened this issue Jun 28, 2019 · 23 comments
Closed

Plain text editing #123

ho1ger opened this issue Jun 28, 2019 · 23 comments
Labels
enhancement New feature or request needs info

Comments

@ho1ger
Copy link

ho1ger commented Jun 28, 2019

It would be quite useful to have a plain text view that only shows the markdown.

@ho1ger ho1ger added the enhancement New feature or request label Jun 28, 2019
@jancborchardt
Copy link
Member

Not sure if we’ll do this – @juliushaertl?

There are already 2 apps which do a good job at this, being the Markdown Editor and the Notes app. :)

@ho1ger
Copy link
Author

ho1ger commented Jun 28, 2019

hmmmm, ...

When my understanding is correct, that this app becomes the default text editor in Nextcloud, it would be quite useful to be able to switch to plain text mode. Let me give an example: There might be text files that contain characters that the parser mistakenly parses as markdown. For instance, you have a text file which maybe contains some bash scripts examples and in the bash there's a line with a comment like this:

comment bla bla...

This would be rendered as a nice headline ;-)

@ho1ger
Copy link
Author

ho1ger commented Jun 28, 2019

Nice :D I actually didn't want that my example

# comment bla bla...

would be rendered... But maybe this shows that what I'm talking about is really an issue.

@lachmanfrantisek
Copy link

@ho1ger You can use code block for that specific purpose:

# comment bla bla...
cat *.txt

(Start and end the block with ```)

@jancborchardt
Copy link
Member

Let me give an example: There might be text files that contain characters that the parser mistakenly parses as markdown. For instance, you have a text file which maybe contains some bash scripts examples and in the bash there's a line with a comment

In that case this issue is a duplicate of Support plain text files #13 and will be taken care of. :)

@heavyelement
Copy link

heavyelement commented Jun 28, 2019

This is also a feature I'd like to see. I'd love to be able to switch between a plaintext view and a styled view. If it was a hotkey, that would be excellent!

@juliusknorr
Copy link
Member

We could open markdown files in plain text mode (after #129) but that would limit all editors to plain text editing as well as not allowing any rich document editing features that tiptap has.

@rkaraba
Copy link

rkaraba commented Jul 1, 2019

Best way to do this is to have button which allows you to switch between plaintext view and a markdown editor.
Something like in current text editor.
You can view plain text and markdown at the same time or only plain text or only markdown
Of course there is no possibility to edit markdown in current text editor
In your app you would switch between plaintext view and full tipitap editor

obrázok

@juliusknorr
Copy link
Member

I have been thinking a bit more about this and unfortunately I don't see a way to bring this together with the collaborative editing. Prosemirror uses a document model that in our case either supports plaintext or rich editing, but not both at the same time. We have proper plaintext support for non-markdown files with #129 and rich editing for markdown files, which should cover most of the use cases. The markdown editor will still continue to work like before and can be used besides the text app.

Since we aimed for a rich editor this is out of scope for the text app.

@spitzlei
Copy link

#123 (comment)

This would be great. Only reason for not using the editor in our company is, that we can't use md/plain at same time. Without this option the editor is not usable for us. Maybe it can be reconsidered to implement this?

@juliusknorr
Copy link
Member

As mentioned, this is a technical limitation of the rich editor, so this is most-likely not going to happen. However the files_markdown editor should continue to work just fine, if you really need the two-sided layout.

@KimmoJ
Copy link

KimmoJ commented Aug 6, 2019

Not having the ability to edit, or even see, the markdown straight in the editor is a fail. One of the points of markdown is that it's easy to read and edit even in source form. What a shame.

@jancborchardt
Copy link
Member

@KimmoJ as mentioned there’s the Markdown Editor and the Notes app already if you need that.

The primary goal of the Text app is to make quick rich-text editing and collaboration work for the masses, not only people who know what Markdown is and how to read it. Markdown being "easy to read in source form" might be true for programmers and people who are used to it, but Nextcloud doesn’t only cater to those people.

@severin-lemaignan
Copy link

Not having the possibility to see and edit the Markdown source is indeed an issue for us.

@juliushaertl if the editor can not do collaborative editing for both rich text and plain text at the same time, why not having a simple switch to either view the file as rich text or as plain text.

@dreamerworks
Copy link

+1 for text mode. Acceptable even as keyboard shortcut. Ideally a toggle button.

@genofire
Copy link

genofire commented Mar 5, 2020

@juliushaertl sorry for writing on closed issues.
I just try to understand the technical limits.
Is the markdown rendered server-side?
(if not, i do not understand, where is the technical problem. it should be possible to have different users has different live views on the same current file)

@dpprdan
Copy link

dpprdan commented May 6, 2020

@genofire #323 (comment)

@claell
Copy link

claell commented Mar 13, 2021

I guess according to #123 (comment) and what I have learned from other comments, the problem is that there are two document formats generated when using WYSIWYG mode and thus offering to edit both at the same time can lead to inconsistencies as then there is no single source of truth anymore.

I suggest overthinking the current system. Maybe there is a way to always treat the Markdown document as "truth". Maybe one does not have to derive a different document format from it to allow WYSIWYG editing in the first place.

@Sieboldianus
Copy link

Sieboldianus commented Feb 3, 2022

The Markdown Editor is not compatible with Nextcloud 22 (because Plaintext Editor, which is needed, is not compatible/tested). :(

@bentuna
Copy link

bentuna commented Jul 3, 2024

Things are getting especially impractical when you try to use parts of a markdown file by copying it out of Nextcloud text and pasting it into a Talk message: All formatting and links are gone - although talk supports markdown.

@jancborchardt
Copy link
Member

@bentuna that sounds like a different issue (and one that should definitely be fixed) – could you open a separate issue about it?

@bentuna
Copy link

bentuna commented Aug 20, 2024

Things are getting especially impractical when you try to use parts of a markdown file by copying it out of Nextcloud text and pasting it into a Talk message: All formatting and links are gone - although talk supports markdown.

@jancborchardt This seems to be fixed in 28.0.8! 👍

@hbarel
Copy link

hbarel commented Nov 25, 2024

I'd be very interested to know if anyone on this thread has devised a way to just edit plain text files on NC.
The Markdown editor is sometimes too little and sometimes too much...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs info
Projects
None yet
Development

No branches or pull requests