Skip to content

Commit

Permalink
fix: do not rewrite previous styles on table cell
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Jul 4, 2024
1 parent b23ac72 commit 73d2917
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
23 changes: 16 additions & 7 deletions projects/demo/src/app/pages/starter/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,25 @@
Start typing
</tui-editor>

<h4>HTML:</h4>
<tui-editor-socket
class="tui-example"
[content]="control.value || ''"
/>
<ng-container *ngIf="preview">
<h4>HTML:</h4>
<tui-editor-socket
class="tui-example"
[content]="control.value || ''"
/>

<h4>Text:</h4>
<p>{{ control.value }}</p>
<h4>Text:</h4>
<p>{{ control.value }}</p>
</ng-container>
</tui-doc-demo>
<tui-doc-documentation>
<ng-template
documentationPropertyName="Show preview"
documentationPropertyType="boolean"
[(documentationPropertyValue)]="preview"
>
Just demo
</ng-template>
<ng-template
documentationPropertyName="disabled"
documentationPropertyType="boolean"
Expand Down
8 changes: 3 additions & 5 deletions projects/demo/src/app/pages/starter/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {NgIf} from '@angular/common';
import {ChangeDetectionStrategy, Component, inject} from '@angular/core';
import {FormControl, ReactiveFormsModule} from '@angular/forms';
import {TuiAddonDoc} from '@taiga-ui/addon-doc';
Expand All @@ -22,6 +23,7 @@ import {
TuiEditorSocket,
TuiEditor,
TuiLink,
NgIf,
],
templateUrl: './index.html',
styleUrls: ['./index.less'],
Expand Down Expand Up @@ -62,11 +64,6 @@ export default class TuiEditorStarter {
protected exampleText = '';
protected minHeight: number | null = null;
protected maxHeight: number | null = null;
protected readOnly = false;
protected focusable = true;
protected pseudoInvalid: boolean | null = null;
protected pseudoFocused: boolean | null = null;
protected pseudoHovered: boolean | null = null;

protected readonly toolsVariants: readonly TuiEditorTool[][] = [
TUI_EDITOR_DEFAULT_TOOLS,
Expand All @@ -80,6 +77,7 @@ export default class TuiEditorStarter {

protected tools = this.toolsVariants[0];
protected floating = false;
protected preview = true;

protected get disabled(): boolean {
return this.control.disabled;
Expand Down

0 comments on commit 73d2917

Please sign in to comment.