mirror of
https://github.com/zadam/trilium.git
synced 2025-11-15 09:45:52 +01:00
remove the option to show CKEditor banner
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user