Skip to content

Commit d8d2097

Browse files
committed
fix: q-editor code button isssue quasarframework#2827
1 parent e1c0c2d commit d8d2097

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/editor/editor-caret.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,14 @@ export class Caret {
175175

176176
apply (cmd, param, done = () => {}) {
177177
if (cmd === 'formatBlock') {
178-
if (['BLOCKQUOTE', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'PRE'].includes(param) && this.is(cmd, param)) {
178+
if (['BLOCKQUOTE', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6'].includes(param) && this.is(cmd, param)) {
179179
cmd = 'outdent'
180180
param = null
181181
}
182+
183+
if (param === 'PRE' && this.is(cmd, 'PRE')) {
184+
param = 'P'
185+
}
182186
}
183187
else if (cmd === 'print') {
184188
done()

0 commit comments

Comments
 (0)