getgrav / grav-premium-issues

Official Grav Premium Issues repository to report problems or ask questions regarding the Premium products offered.
https://getgrav.org/premium
7 stars 2 forks source link

[nextgen-editor] feature-request: ability to view/edit raw Markdown #309

Open yankl opened 1 year ago

yankl commented 1 year ago

As far as I can tell, there is no option in the editor to switch to a raw Markdown view, which would be helpful, as there are still things, I believe, which can be done in raw Markdown but not in the editor. (One example which came up recently was image actions, I don't know if something like this can be entered in NextGen: ![Sample Image](sample-image.jpg?resize=400,200).)

For myself as the site admin, this is not a big deal, as with one click I can switch to Expert Mode, where I can see the raw Markdown (not to mention just opening the .md file itself). However, I have another user who has no access to the direct files, and whom I only gave permissions as follows:

access:
  site:
    login: true
  admin:
    login: true
    pages: true

Apparently that is not sufficient to switch to Expert Mode (and it's not clear to me which permission does allow this). In any case it seems anyone who is able to edit pages should also be able to edit the raw Markdown. Now, I know it's possible to switch to the classic editor, but this involves: 1) going to profile page, 2) switching to CodeMirror, 3) logging out, 4) logging back in, 5) going back to the page you were editing, so clearly, not very convenient (not to mention that it involves editing the user config file which in our setup triggers a repo commit, every single time the user wants to switch editors).

pieter91 commented 1 year ago

I would like to add to this that the solution I tried, adding sourceEditing to the toolbar in the settings, per the docs, doesn't seem to do what CKEditor promises it will in their docs. I agree with @yankl that editing the actual source for the page should be possible. Thanks!