mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(editor): Improve linting for component and prop names (no-changelog) (#8169)
This commit is contained in:
committed by
GitHub
parent
639afcd7a5
commit
68cff4c59e
@@ -176,6 +176,27 @@ export default defineComponent({
|
||||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
htmlEditorEventBus.on('format-html', this.format);
|
||||
|
||||
let doc = this.modelValue;
|
||||
|
||||
if (this.modelValue === '' && this.rows > 0) {
|
||||
doc = '\n'.repeat(this.rows - 1);
|
||||
}
|
||||
|
||||
const state = EditorState.create({ doc, extensions: this.extensions });
|
||||
|
||||
this.editor = new EditorView({ parent: this.root(), state });
|
||||
this.editorState = this.editor.state;
|
||||
|
||||
this.getHighlighter()?.addColor(this.editor, this.resolvableSegments);
|
||||
},
|
||||
|
||||
beforeUnmount() {
|
||||
htmlEditorEventBus.off('format-html', this.format);
|
||||
},
|
||||
|
||||
methods: {
|
||||
root() {
|
||||
const rootRef = this.$refs.htmlEditor as HTMLDivElement | undefined;
|
||||
@@ -264,27 +285,6 @@ export default defineComponent({
|
||||
return highlighter;
|
||||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
htmlEditorEventBus.on('format-html', this.format);
|
||||
|
||||
let doc = this.modelValue;
|
||||
|
||||
if (this.modelValue === '' && this.rows > 0) {
|
||||
doc = '\n'.repeat(this.rows - 1);
|
||||
}
|
||||
|
||||
const state = EditorState.create({ doc, extensions: this.extensions });
|
||||
|
||||
this.editor = new EditorView({ parent: this.root(), state });
|
||||
this.editorState = this.editor.state;
|
||||
|
||||
this.getHighlighter()?.addColor(this.editor, this.resolvableSegments);
|
||||
},
|
||||
|
||||
beforeUnmount() {
|
||||
htmlEditorEventBus.off('format-html', this.format);
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user