-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[Feature] Multiple toolbox items: using of data overrides instead of config overrides #2064
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -463,7 +463,7 @@ export default class InlineToolbar extends Module<InlineToolbarNodes> { | |
| /** | ||
| * Changes Conversion Dropdown content for current block's Tool | ||
| */ | ||
| private setConversionTogglerContent(): void { | ||
| private async setConversionTogglerContent(): Promise<void> { | ||
| const { BlockManager } = this.Editor; | ||
| const { currentBlock } = BlockManager; | ||
| const toolName = currentBlock.name; | ||
|
|
@@ -480,7 +480,7 @@ export default class InlineToolbar extends Module<InlineToolbarNodes> { | |
| /** | ||
| * Get icon or title for dropdown | ||
| */ | ||
| const toolboxSettings = currentBlock.activeToolboxEntry || {}; | ||
| const toolboxSettings = await currentBlock.getActiveToolboxEntry() || {}; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there's one problem with setting toggler's content this way: if none of the configured toolbox entries is active, toggler will contain only tool name Screen.Recording.2022-05-18.at.09.46.01.mov
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think, it is ok because other titles and icons does not correctly fit here. |
||
|
|
||
| this.nodes.conversionTogglerContent.innerHTML = | ||
| toolboxSettings.icon || | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can data have nested objects or arrays? or it's always flat?