✨ Added cursor protection extension
This commit is contained in:
@@ -25,6 +25,7 @@ import {getCodeBlockLanguageExtension} from './lang-parser';
|
||||
import {createLanguageDetection} from './lang-detect';
|
||||
import {SupportedLanguage} from './types';
|
||||
import {getMathBlockExtensions} from './mathBlock';
|
||||
import {createCursorProtection} from './cursorProtection';
|
||||
|
||||
/**
|
||||
* 代码块扩展配置选项
|
||||
@@ -108,6 +109,9 @@ export function createCodeBlockExtension(options: CodeBlockOptions = {}): Extens
|
||||
showBackground
|
||||
}),
|
||||
|
||||
// 光标保护(防止方向键移动到分隔符上)
|
||||
createCursorProtection(),
|
||||
|
||||
// 块选择功能
|
||||
...getBlockSelectExtensions(),
|
||||
|
||||
@@ -207,6 +211,11 @@ export {
|
||||
getMathBlockExtensions
|
||||
} from './mathBlock';
|
||||
|
||||
// 光标保护功能
|
||||
export {
|
||||
createCursorProtection
|
||||
} from './cursorProtection';
|
||||
|
||||
/**
|
||||
* 默认导出
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user