Skip to content

Build your personal knowledge base with Trilium Notes

remove the option to show CKEditor banner

zadam068684101fb6
diff --git a/src/public/app/widgets/type_widgets/content_widget.js b/src/public/app/widgets/type_widgets/content_widget.js
index 27acf55218..2936ab0a76 100644
--- a/src/public/app/widgets/type_widgets/content_widget.js
+++ b/src/public/app/widgets/type_widgets/content_widget.js
@@ -31,7 +31,6 @@ import VacuumDatabaseOptions from "./options/advanced/vacuum_database.js";
import DatabaseAnonymizationOptions from "./options/advanced/database_anonymization.js";
import BackendLogWidget from "./content/backend_log.js";
import AttachmentErasureTimeoutOptions from "./options/other/attachment_erasure_timeout.js";
-import PoweredByCKEditorOptions from "./options/appearance/powered_by_ckeditor.js";
const TPL = `<div class="note-detail-content-widget note-detail-printable">
<style>
@@ -54,7 +53,6 @@ const TPL = `<div class="note-detail-content-widget note-detail-printable">
const CONTENT_WIDGETS = {
_optionsAppearance: [
- PoweredByCKEditorOptions,
ThemeOptions,
FontsOptions,
ZoomFactorOptions,
diff --git a/src/public/app/widgets/type_widgets/options/appearance/powered_by_ckeditor.js b/src/public/app/widgets/type_widgets/options/appearance/powered_by_ckeditor.js
deleted file mode 100644
index 135b8db1e2..0000000000
--- a/src/public/app/widgets/type_widgets/options/appearance/powered_by_ckeditor.js
+++ /dev/null
@@ -1,32 +0,0 @@
-import OptionsWidget from "../options_widget.js";
-import utils from "../../../../services/utils.js";
-
-const TPL = `
-<div class="options-section">
- <h4>Powered by CKEditor banner</h4>
-
- <p>CKEditor by default displays a small banner in the editing area. Some users may find this distracting, so it is possible to hide it.</p>
-
- <select class="powered-by-ckeditor-select form-control">
- <option value="show">shown</option>
- <option value="hide">hidden</option>
- </select>
-</div>`;
-
-export default class PoweredByCKEditorOptions extends OptionsWidget {
- doRender() {
- this.$widget = $(TPL);
- this.$poweredByCKEditorSelect = this.$widget.find(".powered-by-ckeditor-select");
- this.$poweredByCKEditorSelect.on('change', async () => {
- const hidePoweredByCKEditor = this.$poweredByCKEditorSelect.val() === 'hide' ? 'true' : 'false';
-
- await this.updateOption('hidePoweredByCKEditor', hidePoweredByCKEditor);
-
- utils.reloadFrontendApp("Powered by CKEditor change");
- });
- }
-
- async optionsLoaded(options) {
- this.$poweredByCKEditorSelect.val(options.hidePoweredByCKEditor === 'true' ? 'hide' : 'show');
- }
-}
diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css
index 63dca0def8..b8dc2d3aeb 100644
--- a/src/public/stylesheets/style.css
+++ b/src/public/stylesheets/style.css
@@ -1043,3 +1043,7 @@ textarea {
/* Fix center vertical alignment of table cells */
vertical-align: middle;
}
+
+.ck-powered-by-balloon {
+ display: none !important;
+}
\ No newline at end of file
diff --git a/src/routes/api/options.js b/src/routes/api/options.js
index 44db511154..999bcb993f 100644
--- a/src/routes/api/options.js
+++ b/src/routes/api/options.js
@@ -55,8 +55,7 @@ const ALLOWED_OPTIONS = new Set([
'eraseUnusedAttachmentsAfterSeconds',
'disableTray',
'customSearchEngineName',
- 'customSearchEngineUrl',
- 'hidePoweredByCKEditor'
+ 'customSearchEngineUrl'
]);
function getOptions() {
diff --git a/src/routes/index.js b/src/routes/index.js
index 107f8cac16..657619123a 100644
--- a/src/routes/index.js
+++ b/src/routes/index.js
@@ -29,7 +29,6 @@ function index(req, res) {
mainFontSize: parseInt(options.mainFontSize),
treeFontSize: parseInt(options.treeFontSize),
detailFontSize: parseInt(options.detailFontSize),
- hidePoweredByCKEditor: options.hidePoweredByCKEditor === 'true',
maxEntityChangeIdAtLoad: sql.getValue("SELECT COALESCE(MAX(id), 0) FROM entity_changes"),
maxEntityChangeSyncIdAtLoad: sql.getValue("SELECT COALESCE(MAX(id), 0) FROM entity_changes WHERE isSynced = 1"),
instanceName: config.General ? config.General.instanceName : null,
diff --git a/src/services/options_init.js b/src/services/options_init.js
index 080fecd087..547b4f9568 100644
--- a/src/services/options_init.js
+++ b/src/services/options_init.js
@@ -88,8 +88,7 @@ const defaultOptions = [
{ name: 'disableTray', value: 'false', isSynced: false },
{ name: 'eraseUnusedAttachmentsAfterSeconds', value: '2592000', isSynced: true },
{ name: 'customSearchEngineName', value: 'DuckDuckGo', isSynced: true },
- { name: 'customSearchEngineUrl', value: 'https://duckduckgo.com/?q={keyword}', isSynced: true },
- { name: 'hidePoweredByCKEditor', value: 'false', isSynced: true },
+ { name: 'customSearchEngineUrl', value: 'https://duckduckgo.com/?q={keyword}', isSynced: true }
];
function initStartupOptions() {
diff --git a/src/views/desktop.ejs b/src/views/desktop.ejs
index 083c4deaf4..0f2ee750a4 100644
--- a/src/views/desktop.ejs
+++ b/src/views/desktop.ejs
@@ -44,12 +44,6 @@
.note-split {
max-width: <%= maxContentWidth %>px;
}
-
- <% if (hidePoweredByCKEditor) { %>
- .ck-powered-by-balloon {
- display: none !important;
- }
- <% } %>
</style>
<!-- Required for correct loading of scripts in Electron -->