Open lugrinder opened 2 years ago
Hi @lugrinder! 👋
It looks like you provided an invalid or unsupported reproduction URL. Do not use any service other than Codepen, jsFiddle, StackBlitz, Codesandbox, and GitHub. Make sure the URL you provided is correct and reachable. You can test it by visiting it in a private tab, another device, etc. Please edit your original post above and provide a valid reproduction URL as explained.
Without a proper reproduction, your issue will have to get closed.
Thank you for your collaboration. 👏
Hi. code
is built in q-editor command. If you want to update / overwrite commands you can redefine them by using definitions
prop. It may look something like this.
:definitions="{
code: {
tip: 'Code',
icon: null,
label: 'Code'
}
}"
It will just update the label. If you also want to update the method, then you need to include handler field.
:definitions="{
code: {
tip: 'Code',
icon: null,
label: 'Code',
handler: codeCommandHandler
}
}"
Read documentation here.
Ok, thanks for your answer, but I know about this. To solve, I'm doing:
:definitions="{
code: {
tip: $q.lang.editor.code
}
}"
But I think that this was missing in the original code:
code: { cmd: 'formatBlock', param: 'PRE', icon: i.code, htmlTip: `<code>${ e.code }</code>` },
Should be:
code: { cmd: 'formatBlock', param: 'PRE', icon: i.code, tip: e.code, htmlTip: `<code>${ e.code }</code>` },
But I don't know If this was intentionally not added for any reason.
What happened?
In the QEditor component, when using the toolbar dropdown button for paragraph format like:
When you select any of the paragraph options, labels are show correctly in list and button (selected), except for code that is shown in list, but not in button.
What did you expect to happen?
Show the label for 'code' option like in list.
Reproduction URL
https://codepen.io/Lugrinder/pen/wvmjbqR
How to reproduce?
Flavour
Quasar CLI with Webpack (@quasar/cli | @quasar/app-webpack)
Areas
Components (quasar)
Platforms/Browsers
Firefox, Chrome
Quasar info output
Relevant log output
No response
Additional context
No response