Skip to content

Switch between markdown and text editor #323

Description

@jooola

Is your feature request related to a problem? Please describe.
When editing markdown files, I sometimes need to edit the raw (not parsed) markdown content, instead of the rendered one. This option is not available currently.

Describe the solution you'd like
A button near the toolbar could allow someone to switch from the markdown rich editor to the basic text editor in order to edit the markdown file in raw mode.

Activity

  1. changed the title [-]Allow to swith to Raw mode[/-] [+]Switch between markdown and text editor[/+] on Oct 4, 2019
  2. juliusknorr commented on Oct 4, 2019

    @juliusknorr
    Member

    Duplicate of #123 see especially #123 (comment) for some comments on the feature request.

  3. jooola commented on Oct 4, 2019

    @jooola
    Author

    I don't think this is a duplicate, I don't want to see both the markdown source and the rendered html, I would like to swap between the the rich text and plain text editor. At least this is the differences I see between #123 and this request.

    You mentioned that this could be difficult to handle with the collaborative editing. Not sure how it works in this app, but I made few research on how we could enable this, and it seems already supported by ProseMirror.

    I found this : https://prosemirror.net/examples/markdown/

    And it should be easy to integrate (again I don't know how the collaborative editing works with this, simply suggesting)

    Cheers

  4. juliusknorr commented on Oct 4, 2019

    @juliusknorr
    Member

    You mentioned that this could be difficult to handle with the collaborative editing. Not sure how it works in this app, but I made few research on how we could enable this, and it seems already supported by ProseMirror.

    The prose mirror example always creates a new editor when switching, which does not work with collaborative editing. Note that even if we use the same markdown file, the document representation format that is used by prosemirror will be different for visual and plain text editing.

    The main issue here is that when switching all collaborative history data is lost, so if once connected client is not fully up to date or has unsaved changes, they would be lost once we switch the editing mode. Also switching cannot be done per user but would be per document due to the document representation format difference stated above.

    I hope that helps to understand why I think adding such a feature will cause more issues than it solves.

  5. jooola commented on Oct 5, 2019

    @jooola
    Author

    Ok, got it ! Thanks. Sorry for the trouble.

  6. juliusknorr commented on Oct 7, 2019

    @juliusknorr
    Member

    No problem, I get that there is a use case for it, it's just nothing that is likely to become implemented due to technical limitations and the primary goal we had when creating the text app.

  7. small1 commented on Nov 25, 2019

    @small1

    There is a problem at the moment that all markdown files opens by default in the text app. If you want to edit the source you have to rename it to a txt file then edit and then rename it back.

    One solution is to have the ability to switch modes but do it with a warning "this will destroy collaboration and history"

    The other has to be done at server level i guess. To have the ability to open the markdown file as plain text or as markdown. That could work as well. Just not having to rename the file for a simple edit (editing files for cms_pico for example as inerting an image point to an asset url that text cant read)

  8. laarisyko commented on Apr 19, 2020

    @laarisyko

    @small1 I'm a supporter of you point. Pico CMS is great tool, because of its seemless integration and ease of use. The current text editor is great for simple stuff, but it would be great to have option without renaming the files to change the raw file. Even open by the details dialog would be fine. We have for example several files with endings like .dat or similar, which are in the end just text files. I would be great to have the option to open these files with the text editor.

    What acutally happend to the old markdown editor, could it be used in parallel to the new text editor?

  9. claell commented on Mar 13, 2021

    @claell

    Duplicate of #123

  10. marked this as a duplicate of Plain text editing #123 on Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions