ckeditor with table/cell properties

This commit is contained in:
zadam
2020-02-29 14:32:26 +01:00
parent 724ba352e6
commit e5155130e7
7 changed files with 26 additions and 26 deletions

View File

@@ -38,10 +38,10 @@ class AppContext extends Component {
$("body").append($renderedWidget);
$renderedWidget.on('click', "[data-trigger-event]", e => {
const eventName = $(e.target).attr('data-trigger-event');
$renderedWidget.on('click', "[data-trigger-command]", e => {
const commandName = $(e.target).attr('data-trigger-command');
this.triggerEvent(eventName);
this.triggerCommand(commandName);
});
this.tabManager = new TabManager();

View File

@@ -13,21 +13,21 @@ const WIDGET_TPL = `
}
</style>
<a data-trigger-event="createTopLevelNote"
<a data-trigger-command="createTopLevelNote"
title="Create new top level note"
class="icon-action bx bx-folder-plus"></a>
<a data-trigger-event="collapseTree"
<a data-trigger-command="collapseTree"
title="Collapse note tree"
data-command="collapseTree"
class="icon-action bx bx-layer-minus"></a>
<a data-trigger-event="scrollToActiveNote"
<a data-trigger-command="scrollToActiveNote"
title="Scroll to active note"
data-command="scrollToActiveNote"
class="icon-action bx bx-crosshair"></a>
<a data-trigger-event="searchNotes"
<a data-trigger-command="searchNotes"
title="Search in notes"
data-command="searchNotes"
class="icon-action bx bx-search"></a>

View File

@@ -29,7 +29,7 @@ const TPL = `
<span class="caret"></span>
</button>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item options-button" data-trigger-event="showOptions">
<a class="dropdown-item options-button" data-trigger-command="showOptions">
<span class="bx bx-slider"></span>
Options
</a>
@@ -39,44 +39,44 @@ const TPL = `
Sync (<span id="outstanding-syncs-count">0</span>)
</a>
<a class="dropdown-item open-dev-tools-button" data-trigger-event="openDevTools">
<a class="dropdown-item open-dev-tools-button" data-trigger-command="openDevTools">
<span class="bx bx-terminal"></span>
Open Dev Tools
<kbd data-command="openDevTools"></kbd>
</a>
<a class="dropdown-item" data-trigger-event="showSQLConsole">
<a class="dropdown-item" data-trigger-command="showSQLConsole">
<span class="bx bx-data"></span>
Open SQL Console
<kbd data-command="showSQLConsole"></kbd>
</a>
<a class="dropdown-item" data-trigger-event="showBackendLog">
<a class="dropdown-item" data-trigger-command="showBackendLog">
<span class="bx bx-empty"></span>
Show backend log
<kbd data-command="showBackendLog"></kbd>
</a>
<a class="dropdown-item" data-trigger-event="reloadFrontendApp"
<a class="dropdown-item" data-trigger-command="reloadFrontendApp"
title="Reload can help with some visual glitches without restarting the whole app.">
<span class="bx bx-empty"></span>
Reload frontend
<kbd data-command="reloadFrontendApp"></kbd>
</a>
<a class="dropdown-item" data-trigger-event="toggleZenMode">
<a class="dropdown-item" data-trigger-command="toggleZenMode">
<span class="bx bx-empty"></span>
Toggle Zen mode
<kbd data-command="toggleZenMode"></kbd>
</a>
<a class="dropdown-item" data-trigger-event="toggleFullscreen">
<a class="dropdown-item" data-trigger-command="toggleFullscreen">
<span class="bx bx-empty"></span>
Toggle fullscreen
<kbd data-command="toggleFullscreen"></kbd>
</a>
<a class="dropdown-item" data-trigger-event="showHelp">
<a class="dropdown-item" data-trigger-command="showHelp">
<span class="bx bx-info-circle"></span>
Show Help
<kbd data-command="showHelp"></kbd>
@@ -87,7 +87,7 @@ const TPL = `
About Trilium Notes
</a>
<a class="dropdown-item logout-button" data-trigger-event="logout">
<a class="dropdown-item logout-button" data-trigger-command="logout">
<span class="bx bx-log-out"></span>
Logout
</a>

View File

@@ -10,9 +10,9 @@ const TPL = `
}
</style>
<a title="Go to previous note." data-trigger-event="backInNoteHistory" class="icon-action bx bx-left-arrow-circle"></a>
<a title="Go to previous note." data-trigger-command="backInNoteHistory" class="icon-action bx bx-left-arrow-circle"></a>
<a title="Go to next note." data-trigger-event="forwardInNoteHistory" class="icon-action bx bx-right-arrow-circle"></a>
<a title="Go to next note." data-trigger-command="forwardInNoteHistory" class="icon-action bx bx-right-arrow-circle"></a>
</div>
`;

View File

@@ -13,14 +13,14 @@ const TPL = `
<span class="caret"></span>
</button>
<div class="dropdown-menu dropdown-menu-right">
<a data-trigger-event="showNoteRevisions" class="dropdown-item show-note-revisions-button">Revisions</a>
<a data-trigger-event="showAttributes" class="dropdown-item show-attributes-button"><kbd data-command="showAttributes"></kbd> Attributes</a>
<a data-trigger-event="showLinkMap" class="dropdown-item show-link-map-button"><kbd data-command="showLinkMap"></kbd> Link map</a>
<a data-trigger-event="showNoteSource" class="dropdown-item show-source-button"><kbd data-command="showNoteSource"></kbd> Note source</a>
<a data-trigger-command="showNoteRevisions" class="dropdown-item show-note-revisions-button">Revisions</a>
<a data-trigger-command="showAttributes" class="dropdown-item show-attributes-button"><kbd data-command="showAttributes"></kbd> Attributes</a>
<a data-trigger-command="showLinkMap" class="dropdown-item show-link-map-button"><kbd data-command="showLinkMap"></kbd> Link map</a>
<a data-trigger-command="showNoteSource" class="dropdown-item show-source-button"><kbd data-command="showNoteSource"></kbd> Note source</a>
<a class="dropdown-item import-files-button">Import files</a>
<a class="dropdown-item export-note-button">Export note</a>
<a data-trigger-event="printActiveNote" class="dropdown-item print-note-button"><kbd data-command="printActiveNote"></kbd> Print note</a>
<a data-trigger-event="showNoteInfo" class="dropdown-item show-note-info-button"><kbd data-command="showNoteInfo"></kbd> Note info</a>
<a data-trigger-command="printActiveNote" class="dropdown-item print-note-button"><kbd data-command="printActiveNote"></kbd> Print note</a>
<a data-trigger-command="showNoteInfo" class="dropdown-item show-note-info-button"><kbd data-command="showNoteInfo"></kbd> Note info</a>
</div>
</div>`;