Raiper34 / ngx-simple-text-editor

Ngx Simple Text editor or ST editor is a simple native text editor component for Angular 9+.
https://ngx-simple-text-editor.netlify.app
MIT License
5 stars 1 forks source link

Buttons Language Change #21

Open TharusanK23 opened 1 week ago

TharusanK23 commented 1 week ago

Hi, How can change editor buttons language (Like tooltip) for localization?

Raiper34 commented 1 week ago

Hi, You can create your own buttons, just inspire here https://github.com/Raiper34/ngx-simple-text-editor/blob/main/projects/ngx-simple-text-editor/src/lib/constants/editor-buttons.ts . You can simply copy it and paste into your code base, change titles, and use in your editor like

import { Component } from '@angular/core';
import {EditorConfig, ST_BUTTONS} from 'ngx-simple-text-editor';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent {
  content = '';
  config: EditorConfig = {
    placeholder: 'Type something...',
    buttons: ST_BUTTONS,
  };
}