Skip to content

Build your personal knowledge base with Trilium Notes

cleaned up experimental attribute pane

zadamea7257a5b294
diff --git a/src/public/javascripts/services/tab_context.js b/src/public/javascripts/services/tab_context.js
index a41ebc6363..ee629b0e56 100644
--- a/src/public/javascripts/services/tab_context.js
+++ b/src/public/javascripts/services/tab_context.js
@@ -16,40 +16,6 @@ import noteAutocompleteService from "./note_autocomplete.js";
const $tabContentsContainer = $("#note-tab-container");
-const mentionSetup = {
- feeds: [
- {
- marker: '@',
- feed: queryText => {
- return new Promise((res, rej) => {
- noteAutocompleteService.autocompleteSource(queryText, rows => {
- if (rows.length === 1 && rows[0].title === 'No results') {
- rows = [];
- }
-
- for (const row of rows) {
- row.text = row.name = row.noteTitle;
- row.id = '@' + row.text;
- row.link = '#' + row.path;
- }
-
- res(rows);
- });
- });
- },
- itemRenderer: item => {
- const itemElement = document.createElement('span');
-
- itemElement.classList.add('mentions-item');
- itemElement.innerHTML = `${item.highlightedTitle} `;
-
- return itemElement;
- },
- minimumCharacters: 0
- }
- ]
-};
-
const componentClasses = {
'empty': "./note_detail_empty.js",
'text': "./note_detail_text.js",
@@ -103,7 +69,6 @@ class TabContext {
this.$noteDetailComponents = this.$tabContent.find(".note-detail-component");
this.$scriptArea = this.$tabContent.find(".note-detail-script-area");
this.$savedIndicator = this.$tabContent.find(".saved-indicator");
- this.$attributesEditor = this.$tabContent.find(".note-title-attributes");
this.noteChangeDisabled = false;
this.isNoteChanged = false;
this.attributes = new Attributes(this);
@@ -150,16 +115,6 @@ class TabContext {
this.$unprotectButton.on('click', protectedSessionService.unprotectNoteAndSendToServer);
await this.initComponent();
-
- await libraryLoader.requireLibrary(libraryLoader.CKEDITOR);
-
- await BalloonEditor.create(this.$attributesEditor[0], {
- placeholder: "type attributes here, e.g. @rock @year=2019",
- mention: mentionSetup,
- removePlugins: ['Autoformat'],
- blockToolbar: [],
- toolbar: []
- });
}
async initComponent(disableAutoBook = false) {
@@ -195,6 +150,10 @@ class TabContext {
this.setCurrentNotePathToHash();
+ if (this.sidebar) {
+ this.sidebar.noteLoaded(); // load async
+ }
+
this.noteChangeDisabled = true;
try {
@@ -228,10 +187,6 @@ class TabContext {
this.noteType.update();
}
- if (this.sidebar) {
- this.sidebar.noteLoaded(); // load async
- }
-
bundleService.executeRelationBundles(this.note, 'runOnNoteView', this);
}
diff --git a/src/public/stylesheets/desktop.css b/src/public/stylesheets/desktop.css
index 7f9fb0e1c3..065564a83f 100644
--- a/src/public/stylesheets/desktop.css
+++ b/src/public/stylesheets/desktop.css
@@ -410,6 +410,7 @@ body {
padding-top: 4px;
padding-left: 7px;
font-size: 90%;
+ height: 100%;
}
#right-pane .card {
diff --git a/src/views/title.ejs b/src/views/title.ejs
index 1ed22a28f4..45c4a1f553 100644
--- a/src/views/title.ejs
+++ b/src/views/title.ejs
@@ -68,6 +68,4 @@
</div>
</div>
</div>
-
- <div class="note-title-attributes" tabindex="9999"></div>
</div>
\ No newline at end of file