wiki icon indicating copy to clipboard operation
wiki copied to clipboard

feat: client side renderers options

Open AGrzes opened this issue 4 years ago • 10 comments

Addresses #2167

Implementation Plan

  1. Reproduce code fetching renders configuration from client/components/admin/admin-rendering.vue in client/components/editor.vue.
  2. Pass renderers configuration as a property to editor component
  3. In client/components/editor/editor-markdown.vue Wrap md configuration in a function that accepts renderers configuration
  4. Create md as computed property of markdown editor component that will call the previously defined function to initialize markdown engine based on renderers config property
  5. Use md computed property instead of md module variable.
  6. Update md initialization to use renderers configuration

AGrzes avatar Jul 22 '20 18:07 AGrzes

From my point of wiew this is finished - please let me know if any changes are still required.

AGrzes avatar Jul 24 '20 08:07 AGrzes

While this work because you are admin, the renderers query will fail for normal users as the rendering.renderers resolver requires the manage:system permission. Could be changed to write:pages:

https://github.com/Requarks/wiki/blob/95b6a7ad823803b3452169196935426c2a2345f0/server/graph/schemas/rendering.graphql#L21

As for the query itself, inline it directly in editor.vue. External queries are gradually being removed from the project to reduce complexity. e.g.:

import gql from 'graphql-tag'
// ...
query: gql`
{
  rendering {
    ...
  }
}
`

NGPixel avatar Aug 10 '20 00:08 NGPixel

@NGPixel - I added commits handling Your suggestions

AGrzes avatar Aug 11 '20 07:08 AGrzes

Merget latest changes from dev and did small fix.

AGrzes avatar Nov 20 '20 09:11 AGrzes

Merged latest changes from dev

AGrzes avatar Mar 16 '21 08:03 AGrzes

@NGPixel I too would like to prevent our internal data from going to some external server, so I'm very interested in this PR. What is missing for it to be merged?

EugenDueck avatar May 27 '21 02:05 EugenDueck

@NGPixel I too would like to prevent our internal data from going to some external server, so I'm very interested in this PR. What is missing for it to be merged?

Is there a plan when this PR will be merged to the next version of wikijs? It is a great product and I have the same issue that i want to prevent potential data-leaks to external services i can't control. Do we have to wait until wikijs-vnext is released until this feature is added?

mbedded avatar Nov 01 '21 22:11 mbedded

any updates?

yumetodo avatar Nov 01 '22 05:11 yumetodo

any updates?

VusalDev avatar Apr 05 '24 01:04 VusalDev