fix: profile routes
This commit is contained in:
@@ -7,6 +7,7 @@ import Header from '@editorjs/header'
|
||||
import Paragraph from '@editorjs/paragraph'
|
||||
import Embed from '@editorjs/embed'
|
||||
import NestedList from '@editorjs/nested-list'
|
||||
import InlineCode from '@editorjs/inline-code'
|
||||
import { watch } from 'vue'
|
||||
import dayjs from '@/utils/dayjs'
|
||||
|
||||
@@ -136,6 +137,10 @@ export function getEditorTools() {
|
||||
defaultStyle: 'ordered',
|
||||
},
|
||||
},
|
||||
inlineCode: {
|
||||
class: InlineCode,
|
||||
shortcut: 'CMD+SHIFT+M',
|
||||
},
|
||||
embed: {
|
||||
class: Embed,
|
||||
inlineToolbar: false,
|
||||
@@ -336,3 +341,19 @@ export function getFormattedDateRange(
|
||||
format
|
||||
)}`
|
||||
}
|
||||
|
||||
export function getLineStartPosition(string, position) {
|
||||
const charLength = 1
|
||||
let char = ''
|
||||
|
||||
while (char !== '\n' && position > 0) {
|
||||
position = position - charLength
|
||||
char = string.substr(position, charLength)
|
||||
}
|
||||
|
||||
if (char === '\n') {
|
||||
position += 1
|
||||
}
|
||||
|
||||
return position
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user