fix: Code block previous language memory (#3830)
This commit is contained in:
@@ -308,7 +308,11 @@ export default class CodeFence extends Node {
|
||||
}
|
||||
|
||||
inputRules({ type }: { type: NodeType }) {
|
||||
return [textblockTypeInputRule(/^```$/, type)];
|
||||
return [
|
||||
textblockTypeInputRule(/^```$/, type, () => ({
|
||||
language: localStorage?.getItem(PERSISTENCE_KEY) || DEFAULT_LANGUAGE,
|
||||
})),
|
||||
];
|
||||
}
|
||||
|
||||
toMarkdown(state: MarkdownSerializerState, node: ProsemirrorNode) {
|
||||
|
||||
Reference in New Issue
Block a user