Skip to content

Commit

Permalink
adaptaçoes para mudança dinamica de cor de fonte
Browse files Browse the repository at this point in the history
  • Loading branch information
BraunAugusto committed Jan 25, 2024
1 parent ede9930 commit 57276cd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
5 changes: 3 additions & 2 deletions src/editor/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export abstract class IaraEditorStyleManager {
abstract toggleItalic(): void;
abstract toggleUnderline(): void;
abstract toggleUppercase(): void;
abstract setFontFamily(fontName: string): void;
abstract setFontSize(fontSize: number): void;
abstract setSelectionFontFamily(fontName: string): void;
abstract setSelectionFontSize(fontSize: number): void;
abstract setEditorFontColor(fontColor: string): void;
}
12 changes: 10 additions & 2 deletions src/syncfusion/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,22 @@ export class IaraSyncfusionStyleManager extends IaraEditorStyleManager {
super();
}

setFontFamily(fontFamily: string): void {
setSelectionFontFamily(fontFamily: string): void {
this._editor.selection.characterFormat.fontFamily = fontFamily;
this._editor.focusIn();
}
setFontSize(fontSize: number): void {
setSelectionFontSize(fontSize: number): void {
this._editor.selection.characterFormat.fontSize = fontSize;
this._editor.focusIn();
}

setEditorFontColor(color: string)
{
this._editor.setDefaultCharacterFormat({ fontColor: color });
}



toggleBold(): void {
this._editor.editor.toggleBold();
}
Expand Down
15 changes: 9 additions & 6 deletions src/tinymce/style.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
import { IaraEditorStyleManager } from "../editor/style";

export class IaraTinyMceStyleManager extends IaraEditorStyleManager {
toggleBold(): void {
setSelectionFontFamily(_fontName: string): void {
throw new Error("Method not implemented.");
}
toggleItalic(): void {
setSelectionFontSize(_fontSize: number): void {
throw new Error("Method not implemented.");
}
toggleUnderline(): void {
setEditorFontColor(_fontColor: string): void {
throw new Error("Method not implemented.");
}
toggleUppercase(): void {
toggleBold(): void {
throw new Error("Method not implemented.");
}
setFontFamily(): void {
toggleItalic(): void {
throw new Error("Method not implemented.");
}
setFontSize(): void {
toggleUnderline(): void {
throw new Error("Method not implemented.");
}
toggleUppercase(): void {
throw new Error("Method not implemented.");
}
}

0 comments on commit 57276cd

Please sign in to comment.