Skip to content

Commit

Permalink
feat: override cell color tool
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Jul 31, 2024
1 parent 83b9a8e commit dadd8c7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export class TuiEditorStarterPageComponent {
TuiEditorTool.Strikethrough,
TuiEditorTool.HR,
],
[TuiEditorTool.Table, TuiEditorTool.CellColor],
];

tools = this.toolsVariants[0];
Expand Down
6 changes: 5 additions & 1 deletion projects/tui-editor/components/toolbar/toolbar.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,11 @@
tuiItem
class="t-tool t-tool_margin"
></tui-table-merge-cells>

</div>
<div
*ngIf="enabled(editorTool.CellColor)"
class="t-block"
>
<tui-table-cell-color
tuiItem
class="t-tool t-wrapper"
Expand Down
1 change: 1 addition & 0 deletions projects/tui-editor/constants/default-editor-tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const defaultEditorTools = [
TuiEditorTool.Sup,
TuiEditorTool.Sub,
TuiEditorTool.Table,
TuiEditorTool.CellColor,
TuiEditorTool.Details,
];

Expand Down
1 change: 1 addition & 0 deletions projects/tui-editor/enums/editor-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export enum TuiEditorTool {
Sub = `subscript`,
Sup = `superscript`,
Table = `insertTable`,
CellColor = `cellColor`,
Tex = `tex`, // Todo
Underline = `underline`,
Undo = `undo`,
Expand Down

0 comments on commit dadd8c7

Please sign in to comment.