wiki
wiki copied to clipboard
feat: client side renderers options
Addresses #2167
Implementation Plan
- Reproduce code fetching renders configuration from client/components/admin/admin-rendering.vue in client/components/editor.vue.
- Pass renderers configuration as a property to editor component
- In client/components/editor/editor-markdown.vue Wrap md configuration in a function that accepts renderers configuration
- 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
- Use md computed property instead of md module variable.
- Update md initialization to use renderers configuration
From my point of wiew this is finished - please let me know if any changes are still required.
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 - I added commits handling Your suggestions
Merget latest changes from dev
and did small fix.
Merged latest changes from dev
@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?
@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?
any updates?
any updates?