{"version":3,"file":"cm-text_editor.mjs","sources":["../../../projects/cmeditor/src/lib/cmeditor.service.ts","../../../projects/cmeditor/src/lib/cmeditor.component.ts","../../../projects/cmeditor/src/lib/cm-text-editor/cm-text-editor.component.ts","../../../projects/cmeditor/src/lib/cm-text-editor/cm-text-editor.component.html","../../../projects/cmeditor/src/public-api.ts","../../../projects/cmeditor/src/cm-text_editor.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class CMEditorService {\n\n  constructor() { }\n}\n","import { Component } from '@angular/core';\n\n@Component({\n  selector: 'lib-CMEditor',\n  standalone: true,\n  imports: [],\n  template: `\n    <p>\n      cmeditor works!\n    </p>\n  `,\n  styles: ``\n})\nexport class CMEditorComponent {\n\n}\n","import { CommonModule } from '@angular/common';\nimport {\n  ChangeDetectorRef,\n  Component,\n  ElementRef,\n  EventEmitter,\n  forwardRef,\n  Input,\n  Output,\n  Renderer2,\n  ViewEncapsulation,\n} from '@angular/core';\nimport {\n  ControlValueAccessor,\n  FormsModule,\n  NG_VALUE_ACCESSOR,\n} from '@angular/forms';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { ToolbarConfigType } from '../toolbar-config-type';\n\n@Component({\n  selector: 'cm-text-editor',\n  standalone: true,\n  imports: [CommonModule, FormsModule],\n  templateUrl: './cm-text-editor.component.html',\n  styleUrl: './cm-text-editor.component.css',\n  providers: [\n    {\n      provide: NG_VALUE_ACCESSOR,\n      useExisting: forwardRef(() => CMTextEditorComponent),\n      multi: true,\n    },\n  ],\n  encapsulation: ViewEncapsulation.None // Add this line\n\n})\nexport class CMTextEditorComponent implements ControlValueAccessor {\n  @Input() customToolbar!: ToolbarConfigType;\n  @Input() customStyleSheet: string = '';\n  // @Input() textInputStyle: { [key: string]: string } = {};\n  // @Input() containerStyle: { [key: string]: string } = {};\n  // @Input() buttonStyle: { [key: string]: string } = {};\n  // @Input() activeButtonStyles:\n\n  classicToolbar: boolean = true;\n  fontList: string[] = [\n    'Arial',\n    'Verdana',\n    'Times New Roman',\n    'Garamond',\n    'Georgia',\n    'Courier New',\n    'cursive',\n  ];\n  fontSizeOptions: number[] = [1, 2, 3, 4, 5, 6, 7];\n  doc = document;\n  private _value: string = '';\n  onChange: (value: string) => void = () => {};\n  onTouched: () => void = () => {};\n  constructor(private renderer: Renderer2, private el: ElementRef) {}\n  private injectStyles() {\n    const styleElement = this.renderer.createElement('style');\n    this.renderer.appendChild(styleElement, this.renderer.createText(this.customStyleSheet));\n    this.renderer.appendChild(this.el.nativeElement, styleElement);\n  }\n\n  ngOnInit(): void {\n    this.initializer();\n    if (this.customToolbar) {\n      this.classicToolbar = false;\n    }\n    if(this.customStyleSheet){\n      this.injectStyles();\n    }\n    this.modifyText('foreColor', false, { value: '#000' });\n    document.addEventListener(\n      'selectionchange',\n      this.updateActiveButtons.bind(this)\n    );\n  }\n  customStyleApplyingFun(){\n\n  }\n  initializer() {\n    this.highlighter(document.querySelectorAll('.align'), true);\n    this.highlighter(document.querySelectorAll('.spacing'), true);\n    this.highlighter(document.querySelectorAll('.format'), false);\n    this.highlighter(document.querySelectorAll('.script'), true);\n  }\n\n  writeValue(value: string): void {\n    this._value = value;\n    const textInput = document.getElementById('text-input') as HTMLElement;\n    if (textInput) {\n      textInput.innerHTML = value;\n    }\n  }\n\n  registerOnChange(fn: (value: string) => void): void {\n    this.onChange = fn;\n  }\n\n  registerOnTouched(fn: () => void): void {\n    this.onTouched = fn;\n  }\n\n  // Call this method when the content of the text area changes\n  updateValue() {\n    const textInput = document.getElementById('text-input') as HTMLElement;\n    if (textInput) {\n      this._value = textInput.innerHTML; // Get the current HTML content\n      this.onChange(this._value); // Call onChange to propagate the value\n    }\n  }\n\n  modifyText(command: string, defaultUi: boolean, value: any) {\n    const isActive = document.queryCommandState(command);\n    if (isActive) {\n      document.execCommand(command, defaultUi);\n      // console.log('HELLO');\n    } else {\n      // console.log(value);\n\n      document.execCommand(command, defaultUi, value?.value || null);\n    }\n    const excluded = [\n      'undo',\n      'redo',\n      'unlink',\n      'indent',\n      'outdent',\n      'backColor',\n      'foreColor',\n      'createLink',\n    ];\n    // console.log(!excluded.includes(command));\n    if (!excluded.includes(command)) {\n      // console.log(!excluded.includes(command));\n\n      this.updateButtonState(command);\n    } // Update button state after executing the command\n  }\n\n  updateButtonState(command: string) {\n    // console.log('updateButtonState : ', command);\n    const button = document.querySelector(`button[data-command=\"${command}\"]`);\n    if (button) {\n      const isActive = document.queryCommandState(command);\n      // console.log('isactive : ', isActive);\n\n      if (isActive) {\n        // console.log('applying class active');\n\n        button.classList.add('active');\n      } else {\n        button.classList.remove('active');\n      }\n    }\n  }\n\n  updateActiveButtons() {\n    [\n      'bold',\n      'italic',\n      'underline',\n      'strikethrough',\n      'superscript',\n      'subscript',\n      'insertOrderedList',\n      'insertUnorderedList',\n      'createLink',\n      'justifyLeft',\n      'justifyCenter',\n      'justifyRight',\n      'justifyFull',\n      'indent',\n      'outdent',\n      'insertTable',\n    ].forEach((command) => {\n      this.updateButtonState(command);\n    });\n  }\n\n  createLink() {\n    const userLink = prompt('Enter a URL');\n    // console.log(userLink);\n\n    if (userLink) {\n      const formattedLink = /http/i.test(userLink)\n        ? userLink\n        : `http://${userLink}`;\n      this.modifyText('createLink', false, { value: formattedLink });\n    }\n  }\n\n  highlighter(buttons: NodeListOf<Element>, needsRemoval: boolean) {\n    buttons.forEach((button) => {\n      button.addEventListener('click', () => {\n        const alreadyActive = button.classList.contains('active');\n        if (needsRemoval) {\n          this.removeActive(buttons);\n          if (!alreadyActive) {\n            button.classList.add('active');\n          }\n        } else {\n          button.classList.toggle('active');\n        }\n      });\n    });\n  }\n\n  removeActive(buttons: NodeListOf<Element>) {\n    buttons.forEach((button) => {\n      button.classList.remove('active');\n    });\n  }\n\n  insertTable() {\n    const rows = prompt('Enter the number of rows:');\n    const cols = prompt('Enter the number of columns:');\n\n    if (rows && cols) {\n      const table = document.createElement('table');\n      table.style.borderCollapse = 'collapse';\n      table.style.width = '100%';\n\n      for (let i = 0; i < Number(rows); i++) {\n        const row = table.insertRow();\n        for (let j = 0; j < Number(cols); j++) {\n          const cell = row.insertCell();\n          cell.style.border = '1px solid #000';\n          cell.style.padding = '8px';\n          cell.contentEditable = 'true'; // Make cells editable\n        }\n      }\n\n      // Insert the table at the current cursor position\n      const selection = window.getSelection();\n      if (selection == null) return;\n      const range = selection.getRangeAt(0);\n      range.insertNode(table);\n    }\n  }\n}\n","<style [innerHTML]=\"customStyleSheet\"></style>\n<div class=\"container\">\n  <div class=\"options\">\n    <!-- Text Format -->\n    <button\n      data-command=\"bold\"\n      id=\"bold\"\n      *ngIf=\"customToolbar?.bold || classicToolbar\"\n      class=\"option-button format\"\n      (click)=\"modifyText('bold', false, $event.target)\"\n      title=\"Bold\"\n    >\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        height=\"14\"\n        width=\"10.5\"\n        viewBox=\"0 0 384 512\"\n      >\n        <!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->\n        <path\n          d=\"M0 64C0 46.3 14.3 32 32 32l48 0 16 0 128 0c70.7 0 128 57.3 128 128c0 31.3-11.3 60.1-30 82.3c37.1 22.4 62 63.1 62 109.7c0 70.7-57.3 128-128 128L96 480l-16 0-48 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l16 0 0-160L48 96 32 96C14.3 96 0 81.7 0 64zM224 224c35.3 0 64-28.7 64-64s-28.7-64-64-64L112 96l0 128 112 0zM112 288l0 128 144 0c35.3 0 64-28.7 64-64s-28.7-64-64-64l-32 0-112 0z\"\n        />\n      </svg>\n    </button>\n    <button\n      data-command=\"italic\"\n      id=\"italic\"\n      *ngIf=\"customToolbar?.italic || classicToolbar\"\n      class=\"option-button format\"\n      (click)=\"modifyText('italic', false, $event.target)\"\n      title=\"Italic\"\n    >\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        height=\"14\"\n        width=\"10.5\"\n        viewBox=\"0 0 384 512\"\n      >\n        <!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->\n        <path\n          d=\"M128 64c0-17.7 14.3-32 32-32l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-58.7 0L160 416l64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l58.7 0L224 96l-64 0c-17.7 0-32-14.3-32-32z\"\n        />\n      </svg>\n    </button>\n    <button\n      data-command=\"underline\"\n      id=\"underline\"\n      *ngIf=\"customToolbar?.underline || classicToolbar\"\n      class=\"option-button format\"\n      (click)=\"modifyText('underline', false, $event.target)\"\n      title=\"Underline\"\n    >\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        height=\"14\"\n        width=\"12.25\"\n        viewBox=\"0 0 448 512\"\n      >\n        <!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->\n        <path\n          d=\"M16 64c0-17.7 14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-16 0 0 128c0 53 43 96 96 96s96-43 96-96l0-128-16 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-16 0 0 128c0 88.4-71.6 160-160 160s-160-71.6-160-160L64 96 48 96C30.3 96 16 81.7 16 64zM0 448c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32z\"\n        />\n      </svg>\n    </button>\n    <button\n      data-command=\"strikethrough\"\n      id=\"strikethrough\"\n      *ngIf=\"customToolbar?.strikethrough || classicToolbar\"\n      class=\"option-button format\"\n      (click)=\"modifyText('strikethrough', false, $event.target)\"\n      title=\"Strike Through\"\n    >\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        height=\"14\"\n        width=\"14\"\n        viewBox=\"0 0 512 512\"\n      >\n        <!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->\n        <path\n          d=\"M161.3 144c3.2-17.2 14-30.1 33.7-38.6c21.1-9 51.8-12.3 88.6-6.5c11.9 1.9 48.8 9.1 60.1 12c17.1 4.5 34.6-5.6 39.2-22.7s-5.6-34.6-22.7-39.2c-14.3-3.8-53.6-11.4-66.6-13.4c-44.7-7-88.3-4.2-123.7 10.9c-36.5 15.6-64.4 44.8-71.8 87.3c-.1 .6-.2 1.1-.2 1.7c-2.8 23.9 .5 45.6 10.1 64.6c4.5 9 10.2 16.9 16.7 23.9L32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l448 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-209.9 0-.4-.1-1.1-.3c-36-10.8-65.2-19.6-85.2-33.1c-9.3-6.3-15-12.6-18.2-19.1c-3.1-6.1-5.2-14.6-3.8-27.4zM348.9 337.2c2.7 6.5 4.4 15.8 1.9 30.1c-3 17.6-13.8 30.8-33.9 39.4c-21.1 9-51.7 12.3-88.5 6.5c-18-2.9-49.1-13.5-74.4-22.1c-5.6-1.9-11-3.7-15.9-5.4c-16.8-5.6-34.9 3.5-40.5 20.3s3.5 34.9 20.3 40.5c3.6 1.2 7.9 2.7 12.7 4.3c0 0 0 0 0 0s0 0 0 0c24.9 8.5 63.6 21.7 87.6 25.6c0 0 0 0 0 0l.2 0c44.7 7 88.3 4.2 123.7-10.9c36.5-15.6 64.4-44.8 71.8-87.3c3.6-21 2.7-40.4-3.1-58.1l-75.7 0c7 5.6 11.4 11.2 13.9 17.2z\"\n        />\n      </svg>\n    </button>\n    <button\n      data-command=\"superscript\"\n      id=\"superscript\"\n      *ngIf=\"customToolbar?.superscript || classicToolbar\"\n      class=\"option-button script\"\n      (click)=\"modifyText('superscript', false, $event.target)\"\n      title=\"SuperScript\"\n    >\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        height=\"14\"\n        width=\"14\"\n        viewBox=\"0 0 512 512\"\n      >\n        <!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->\n        <path\n          d=\"M480 32c0-11.1-5.7-21.4-15.2-27.2s-21.2-6.4-31.1-1.4l-32 16c-15.8 7.9-22.2 27.1-14.3 42.9C393 73.5 404.3 80 416 80l0 80c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l0-128zM32 64C14.3 64 0 78.3 0 96s14.3 32 32 32l15.3 0 89.6 128L47.3 384 32 384c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0c10.4 0 20.2-5.1 26.2-13.6L176 311.8l85.8 122.6c6 8.6 15.8 13.6 26.2 13.6l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-15.3 0L215.1 256l89.6-128 15.3 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0c-10.4 0-20.2 5.1-26.2 13.6L176 200.2 90.2 77.6C84.2 69.1 74.4 64 64 64L32 64z\"\n        />\n      </svg>\n    </button>\n    <button\n      data-command=\"subscript\"\n      id=\"subscript\"\n      *ngIf=\"customToolbar?.subscript || classicToolbar\"\n      class=\"option-button script\"\n      (click)=\"modifyText('subscript', false, $event.target)\"\n      title=\"SubScript\"\n    >\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        height=\"14\"\n        width=\"14\"\n        viewBox=\"0 0 512 512\"\n      >\n        <!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->\n        <path\n          d=\"M32 64C14.3 64 0 78.3 0 96s14.3 32 32 32l15.3 0 89.6 128L47.3 384 32 384c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0c10.4 0 20.2-5.1 26.2-13.6L176 311.8l85.8 122.6c6 8.6 15.8 13.6 26.2 13.6l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-15.3 0L215.1 256l89.6-128 15.3 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0c-10.4 0-20.2 5.1-26.2 13.6L176 200.2 90.2 77.6C84.2 69.1 74.4 64 64 64L32 64zM480 320c0-11.1-5.7-21.4-15.2-27.2s-21.2-6.4-31.1-1.4l-32 16c-15.8 7.9-22.2 27.1-14.3 42.9C393 361.5 404.3 368 416 368l0 80c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l0-128z\"\n        />\n      </svg>\n    </button>\n\n    <!-- List -->\n    <button\n      data-command=\"insertOrderedList\"\n      id=\"insertOrderedList\"\n      *ngIf=\"customToolbar?.orderedList || classicToolbar\"\n      class=\"option-button\"\n      (click)=\"modifyText('insertOrderedList', false, $event.target)\"\n      title=\"Insert Ordered List\"\n    >\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        height=\"14\"\n        width=\"14\"\n        viewBox=\"0 0 512 512\"\n      >\n        <!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->\n        <path\n          d=\"M24 56c0-13.3 10.7-24 24-24l32 0c13.3 0 24 10.7 24 24l0 120 16 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l16 0 0-96-8 0C34.7 80 24 69.3 24 56zM86.7 341.2c-6.5-7.4-18.3-6.9-24 1.2L51.5 357.9c-7.7 10.8-22.7 13.3-33.5 5.6s-13.3-22.7-5.6-33.5l11.1-15.6c23.7-33.2 72.3-35.6 99.2-4.9c21.3 24.4 20.8 60.9-1.1 84.7L86.8 432l33.2 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-88 0c-9.5 0-18.2-5.6-22-14.4s-2.1-18.9 4.3-25.9l72-78c5.3-5.8 5.4-14.6 .3-20.5zM224 64l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z\"\n        />\n      </svg>\n    </button>\n    <button\n      data-command=\"insertUnorderedList\"\n      id=\"insertUnorderedList\"\n      *ngIf=\"customToolbar?.unorderedList || classicToolbar\"\n      class=\"option-button\"\n      (click)=\"modifyText('insertUnorderedList', false, $event.target)\"\n      title=\"Insert Unordered List\"\n    >\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        height=\"14\"\n        width=\"14\"\n        viewBox=\"0 0 512 512\"\n      >\n        <!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->\n        <path\n          d=\"M40 48C26.7 48 16 58.7 16 72l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24L40 48zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L192 64zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zM16 232l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-48 0c-13.3 0-24 10.7-24 24zM40 368c-13.3 0-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-48 0z\"\n        />\n      </svg>\n    </button>\n\n    <!-- Undo/Redo -->\n    <button\n      id=\"undo\"\n      class=\"option-button\"\n      *ngIf=\"customToolbar?.undo || classicToolbar\"\n      (click)=\"modifyText('undo', false, $event.target)\"\n      title=\"Undo\"\n    >\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        height=\"14\"\n        width=\"14\"\n        viewBox=\"0 0 512 512\"\n      >\n        <!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->\n        <path\n          d=\"M48.5 224L40 224c-13.3 0-24-10.7-24-24L16 72c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2L98.6 96.6c87.6-86.5 228.7-86.2 315.8 1c87.5 87.5 87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3c-62.2-62.2-162.7-62.5-225.3-1L185 183c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8L48.5 224z\"\n        />\n      </svg>\n    </button>\n    <button\n      id=\"redo\"\n      class=\"option-button\"\n      *ngIf=\"customToolbar?.redo || classicToolbar\"\n      (click)=\"modifyText('redo', false, $event.target)\"\n      title=\"Redo\"\n    >\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        height=\"14\"\n        width=\"14\"\n        viewBox=\"0 0 512 512\"\n      >\n        <!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->\n        <path\n          d=\"M463.5 224l8.5 0c13.3 0 24-10.7 24-24l0-128c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8l119.5 0z\"\n        />\n      </svg>\n    </button>\n\n    <!-- Link -->\n    <button\n      data-command=\"createLink\"\n      id=\"createLink\"\n      *ngIf=\"customToolbar?.hyperlink || classicToolbar\"\n      class=\"adv-option-button\"\n      (click)=\"createLink()\"\n      title=\"Add Hyperlink\"\n    >\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        height=\"14\"\n        width=\"17.5\"\n        viewBox=\"0 0 640 512\"\n      >\n        <!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->\n        <path\n          d=\"M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z\"\n        />\n      </svg>\n    </button>\n    <button\n      id=\"unlink\"\n      *ngIf=\"customToolbar?.unlink || classicToolbar\"\n      class=\"option-button\"\n      (click)=\"modifyText('unlink', false, $event.target)\"\n      title=\"Remove Hyperlink\"\n    >\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        height=\"14\"\n        width=\"17.5\"\n        viewBox=\"0 0 640 512\"\n      >\n        <!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->\n        <path\n          d=\"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L489.3 358.2l90.5-90.5c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114l-96 96-31.9-25C430.9 239.6 420.1 175.1 377 132c-52.2-52.3-134.5-56.2-191.3-11.7L38.8 5.1zM239 162c30.1-14.9 67.7-9.9 92.8 15.3c20 20 27.5 48.3 21.7 74.5L239 162zM406.6 416.4L220.9 270c-2.1 39.8 12.2 80.1 42.2 110c38.9 38.9 94.4 51 143.6 36.3zm-290-228.5L60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5l61.8-61.8-50.6-39.9z\"\n        />\n      </svg>\n    </button>\n\n    <!-- Alignment -->\n    <button\n      data-command=\"justifyLeft\"\n      id=\"justifyLeft\"\n      *ngIf=\"customToolbar?.alignLeft || classicToolbar\"\n      class=\"option-button align\"\n      (click)=\"modifyText('justifyLeft', false, $event.target)\"\n      title=\"Align Left\"\n    >\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        height=\"14\"\n        width=\"12.25\"\n        viewBox=\"0 0 448 512\"\n      >\n        <!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->\n        <path\n          d=\"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z\"\n        />\n      </svg>\n    </button>\n    <button\n      data-command=\"justifyCenter\"\n      id=\"justifyCenter\"\n      *ngIf=\"customToolbar?.alignCenter || classicToolbar\"\n      class=\"option-button align\"\n      (click)=\"modifyText('justifyCenter', false, $event.target)\"\n      title=\"Align Center\"\n    >\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        height=\"14\"\n        width=\"12.25\"\n        viewBox=\"0 0 448 512\"\n      >\n        <!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->\n        <path\n          d=\"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z\"\n        />\n      </svg>\n    </button>\n    <button\n      data-command=\"justifyRight\"\n      id=\"justifyRight\"\n      *ngIf=\"customToolbar?.alignRight || classicToolbar\"\n      class=\"option-button align\"\n      (click)=\"modifyText('justifyRight', false, $event.target)\"\n      title=\"Align Right\"\n    >\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        height=\"14\"\n        width=\"12.25\"\n        viewBox=\"0 0 448 512\"\n      >\n        <!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->\n        <path\n          d=\"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z\"\n        />\n      </svg>\n    </button>\n    <button\n      data-command=\"justifyFull\"\n      id=\"justifyFull\"\n      *ngIf=\"customToolbar?.justify || classicToolbar\"\n      class=\"option-button align\"\n      (click)=\"modifyText('justifyFull', false, $event.target)\"\n      title=\"Justify\"\n    >\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        height=\"14\"\n        width=\"12.25\"\n        viewBox=\"0 0 448 512\"\n      >\n        <!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->\n        <path\n          d=\"M448 64c0-17.7-14.3-32-32-32L32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32zm0 256c0-17.7-14.3-32-32-32L32 288c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 192c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32zM448 448c0-17.7-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32z\"\n        />\n      </svg>\n    </button>\n    <button\n      data-command=\"indent\"\n      id=\"indent\"\n      *ngIf=\"customToolbar?.indent || classicToolbar\"\n      class=\"option-button spacing\"\n      (click)=\"modifyText('indent', false, $event.target)\"\n      title=\"Indent\"\n    >\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        height=\"14\"\n        width=\"12.25\"\n        viewBox=\"0 0 448 512\"\n      >\n        <!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->\n        <path\n          d=\"M0 64C0 46.3 14.3 32 32 32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64zM192 192c0-17.7 14.3-32 32-32l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32zm32 96l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zM0 448c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32zM127.8 268.6L25.8 347.9C15.3 356.1 0 348.6 0 335.3L0 176.7c0-13.3 15.3-20.8 25.8-12.6l101.9 79.3c8.2 6.4 8.2 18.9 0 25.3z\"\n        />\n      </svg>\n    </button>\n    <button\n      data-command=\"outdent\"\n      id=\"outdent\"\n      *ngIf=\"customToolbar?.outdent || classicToolbar\"\n      class=\"option-button spacing\"\n      (click)=\"modifyText('outdent', false, $event.target)\"\n      title=\"Outdent\"\n    >\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        height=\"14\"\n        width=\"12.25\"\n        viewBox=\"0 0 448 512\"\n      >\n        <!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->\n        <path\n          d=\"M0 64C0 46.3 14.3 32 32 32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64zM192 192c0-17.7 14.3-32 32-32l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32zm32 96l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zM0 448c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32zM.2 268.6c-8.2-6.4-8.2-18.9 0-25.3l101.9-79.3c10.5-8.2 25.8-.7 25.8 12.6l0 158.6c0 13.3-15.3 20.8-25.8 12.6L.2 268.6z\"\n        />\n      </svg>\n    </button>\n    <button\n      data-command=\"insertTable\"\n      id=\"insertTable\"\n      *ngIf=\"customToolbar?.table || classicToolbar\"\n      title=\"Insert Table\"\n      class=\"option-button table-insert\"\n      (click)=\"insertTable()\"\n      title=\"Insert Table\"\n    >\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        height=\"14\"\n        width=\"14\"\n        viewBox=\"0 0 512 512\"\n      >\n        <!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->\n        <path\n          d=\"M64 256l0-96 160 0 0 96L64 256zm0 64l160 0 0 96L64 416l0-96zm224 96l0-96 160 0 0 96-160 0zM448 256l-160 0 0-96 160 0 0 96zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32z\"\n        />\n      </svg>\n    </button>\n  </div>\n  <div class=\"opt-group\">\n    <!-- Headings -->\n\n    <div\n      class=\"select-wrapper\"\n      *ngIf=\"customToolbar?.formatBlock || classicToolbar\"\n    >\n      <label for=\"formatBlock\">Format Block</label>\n      <select\n        id=\"formatBlock\"\n        class=\"adv-option-button\"\n        (change)=\"modifyText('formatBlock', false, $event.target)\"\n      >\n        <option value=\"H1\">H1</option>\n        <option value=\"H2\">H2</option>\n        <option value=\"H3\">H3</option>\n        <option value=\"H4\">H4</option>\n        <option value=\"H5\">H5</option>\n        <option value=\"H6\">H6</option>\n      </select>\n    </div>\n    <!-- Font -->\n    <div\n      class=\"select-wrapper\"\n      *ngIf=\"customToolbar?.fontName || classicToolbar\"\n    >\n      <label for=\"fontName\">Font</label>\n      <select\n        id=\"fontName\"\n        class=\"adv-option-button\"\n        (change)=\"modifyText('fontName', false, $event.target)\"\n      >\n        <option *ngFor=\"let font of fontList\" [value]=\"font\">{{ font }}</option>\n      </select>\n    </div>\n    <div\n      class=\"select-wrapper\"\n      *ngIf=\"customToolbar?.fontSize || classicToolbar\"\n    >\n      <label for=\"fontSize\">Font Size</label>\n      <select\n        id=\"fontSize\"\n        class=\"adv-option-button\"\n        (change)=\"modifyText('fontSize', false, $event.target)\"\n      >\n        <option *ngFor=\"let size of fontSizeOptions\" [value]=\"size\">\n          {{ size }}\n        </option>\n      </select>\n    </div>\n\n    <!-- Color -->\n    <div\n      class=\"input-wrapper\"\n      *ngIf=\"customToolbar?.fontColor || classicToolbar\"\n    >\n      <label for=\"foreColor\">Font Color</label>\n      <input\n        type=\"color\"\n        id=\"foreColor\"\n        class=\"adv-option-button\"\n        (change)=\"modifyText('foreColor', false, $event.target)\"\n      />\n    </div>\n    <div\n      class=\"input-wrapper\"\n      *ngIf=\"customToolbar?.highlightColor || classicToolbar\"\n    >\n      <label for=\"backColor\">Highlight Color</label>\n      <input\n        type=\"color\"\n        id=\"backColor\"\n        class=\"adv-option-button\"\n        (change)=\"modifyText('backColor', false, $event.target)\"\n      />\n    </div>\n  </div>\n  <div id=\"text-input\" contenteditable=\"true\" (input)=\"updateValue()\"></div>\n</div>\n","/*\n * Public API Surface of cmeditor\n */\n\nexport * from './lib/cmeditor.service';\nexport * from './lib/cmeditor.component';\nexport {CMTextEditorComponent} from './lib/cm-text-editor/cm-text-editor.component';\nexport * from './lib/toolbar-config-type';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAKa,eAAe,CAAA;AAE1B,IAAA,WAAA,GAAA,GAAiB;uGAFN,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAf,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cAFd,MAAM,EAAA,CAAA,CAAA;;2FAEP,eAAe,EAAA,UAAA,EAAA,CAAA;kBAH3B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;MCSY,iBAAiB,CAAA;uGAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,EAPlB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA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