-
Notifications
You must be signed in to change notification settings - Fork 11
Améliorer la saisie avec un éditeur WYSIWYG #796
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
base: main
Are you sure you want to change the base?
The head ref may contain hidden characters: "687-am\u00E9liorer-la-saisie-erreurs-et-recommandations"
Conversation
d5003ef
to
2ba70c2
Compare
2ba70c2
to
31ce9e5
Compare
6672e96
to
b9a24e0
Compare
b9a24e0
to
1250bda
Compare
3251d48
to
9f3a245
Compare
75c5aeb
to
7981839
Compare
* Should handle existing markdown content * The editor is configured with extensions: * all what's in StarterKit * code block lowlight * highlight * link * task * typography (with french double quotes) * Some styles have been added to fit DSFR styling Still work in progress, but a nice start! To do: * image uploading and placement inside editor * menu buttons * accessibility tests and improvements
(and possibly importing JSON content?)
Pruning uploads should not be possible from client web app. This is now only available on backend side. Code has been commented out in case we need to test it quickly for the web app.
63560a0
to
465801e
Compare
If not editable: * avoid adding useless functionnalities * do not display buttons
465801e
to
fb6476b
Compare
* require access token to prune images * add workflow to trigger pruning
constructor() { | ||
const debugQuery = process.env.DEBUG === "prisma:query"; | ||
let logObject = {}; | ||
if (debugQuery) { | ||
// Note: ideally we would use `emit: "event"` instead of `emit: "stdout"` | ||
// to avoid double logging, but Prisma's query logging is connection-scoped | ||
// rather than query-scoped, so queries using an existing connection | ||
// would not appear in logs | ||
// TODO: improve when upgrading Prisma | ||
logObject = { | ||
log: [ | ||
{ | ||
emit: "stdout", | ||
level: "query" | ||
} | ||
] | ||
}; | ||
} | ||
super(logObject); | ||
} | ||
|
||
async onModuleInit() { | ||
await this.$connect(); | ||
this.$on("query", (query: Prisma.QueryEvent) => { | ||
let q = query.query; | ||
JSON.parse(query.params).forEach((e, i) => { | ||
q = q.replace(`$${i + 1}`, `'${e}'`); | ||
}); | ||
console.log("======================================="); | ||
console.log("--- Prisma Query (with $n replaced) ---"); | ||
console.log(q); | ||
console.log("Duration: " + query.duration + "ms\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a besoin de tout ça ? Ou c'était juste pour débuguer ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C’est pour déboguer les requêtes SQL qui utilisent des variables $1
, $2
, …
Avec DEBUG="prisma:query"
, on affiche ainsi ces $1
, $2
, … par leur valeurs de remplacement.
Ça peut être utile en « général », mais le code actuel ne contient finalement plus ce type de requête… donc bon…
Still work in progress, but a nice start!
To do: