@eugenemahota/angular-editor 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +265 -0
- package/esm2020/eugenemahota-angular-editor.mjs +5 -0
- package/esm2020/lib/ae-select/ae-select.component.mjs +185 -0
- package/esm2020/lib/angular-editor-toolbar.component.mjs +369 -0
- package/esm2020/lib/angular-editor.component.mjs +408 -0
- package/esm2020/lib/angular-editor.module.mjs +25 -0
- package/esm2020/lib/angular-editor.service.mjs +274 -0
- package/esm2020/lib/config.mjs +36 -0
- package/esm2020/lib/utils.mjs +4 -0
- package/esm2020/public-api.mjs +8 -0
- package/eugenemahota-angular-editor.d.ts +5 -0
- package/fesm2015/eugenemahota-angular-editor.mjs +1292 -0
- package/fesm2015/eugenemahota-angular-editor.mjs.map +1 -0
- package/fesm2020/eugenemahota-angular-editor.mjs +1286 -0
- package/fesm2020/eugenemahota-angular-editor.mjs.map +1 -0
- package/lib/ae-select/ae-select.component.d.ts +46 -0
- package/lib/angular-editor-toolbar.component.d.ts +99 -0
- package/lib/angular-editor.component.d.ts +127 -0
- package/lib/angular-editor.module.d.ts +11 -0
- package/lib/angular-editor.service.d.ts +86 -0
- package/lib/config.d.ts +39 -0
- package/lib/utils.d.ts +1 -0
- package/package.json +50 -0
- package/public-api.d.ts +5 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"eugenemahota-angular-editor.mjs","sources":["../../../projects/angular-editor/src/lib/angular-editor.service.ts","../../../projects/angular-editor/src/lib/config.ts","../../../projects/angular-editor/src/lib/utils.ts","../../../projects/angular-editor/src/lib/ae-select/ae-select.component.ts","../../../projects/angular-editor/src/lib/ae-select/ae-select.component.html","../../../projects/angular-editor/src/lib/angular-editor-toolbar.component.ts","../../../projects/angular-editor/src/lib/angular-editor-toolbar.component.html","../../../projects/angular-editor/src/lib/angular-editor.component.ts","../../../projects/angular-editor/src/lib/angular-editor.component.html","../../../projects/angular-editor/src/lib/angular-editor.module.ts","../../../projects/angular-editor/src/public-api.ts","../../../projects/angular-editor/src/eugenemahota-angular-editor.ts"],"sourcesContent":["import {Inject, Injectable} from '@angular/core';\nimport {HttpClient, HttpEvent} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {DOCUMENT} from '@angular/common';\nimport {CustomClass} from './config';\n\nexport interface UploadResponse {\n imageUrl: string;\n}\n\n@Injectable()\nexport class AngularEditorService {\n\n savedSelection: Range | null;\n selectedText: string;\n uploadUrl: string;\n uploadWithCredentials: boolean;\n\n constructor(\n private http: HttpClient,\n @Inject(DOCUMENT) private doc: any\n ) { }\n\n /**\n * Executed command from editor header buttons exclude toggleEditorMode\n * @param command string from triggerCommand\n */\n executeCommand(command: string) {\n const commands = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'pre'];\n if (commands.includes(command)) {\n this.doc.execCommand('formatBlock', false, command);\n return;\n }\n this.doc.execCommand(command, false, null);\n }\n\n /**\n * Create URL link\n * @param url string from UI prompt\n */\n createLink(url: string) {\n if (!url.includes('http')) {\n this.doc.execCommand('createlink', false, url);\n } else {\n const newUrl = '<a href=\"' + url + '\" target=\"_blank\">' + this.selectedText + '</a>';\n this.insertHtml(newUrl);\n }\n }\n\n /**\n * insert color either font or background\n *\n * @param color color to be inserted\n * @param where where the color has to be inserted either text/background\n */\n insertColor(color: string, where: string): void {\n const restored = this.restoreSelection();\n if (restored) {\n if (where === 'textColor') {\n this.doc.execCommand('foreColor', false, color);\n } else {\n this.doc.execCommand('hiliteColor', false, color);\n }\n }\n }\n\n /**\n * Set font name\n * @param fontName string\n */\n setFontName(fontName: string) {\n this.doc.execCommand('fontName', false, fontName);\n }\n\n /**\n * Set font size\n * @param fontSize string\n */\n setFontSize(fontSize: string) {\n this.doc.execCommand('fontSize', false, fontSize);\n }\n\n /**\n * Create raw HTML\n * @param html HTML string\n */\n insertHtml(html: string): void {\n\n const isHTMLInserted = this.doc.execCommand('insertHTML', false, html);\n\n if (!isHTMLInserted) {\n throw new Error('Unable to perform the operation');\n }\n }\n\n /**\n * save selection when the editor is focussed out\n */\n public saveSelection = (): void => {\n if (this.doc.getSelection) {\n const sel = this.doc.getSelection();\n if (sel.getRangeAt && sel.rangeCount) {\n this.savedSelection = sel.getRangeAt(0);\n this.selectedText = sel.toString();\n }\n } else if (this.doc.getSelection && this.doc.createRange) {\n this.savedSelection = document.createRange();\n } else {\n this.savedSelection = null;\n }\n }\n\n /**\n * restore selection when the editor is focused in\n *\n * saved selection when the editor is focused out\n */\n restoreSelection(): boolean {\n if (this.savedSelection) {\n if (this.doc.getSelection) {\n const sel = this.doc.getSelection();\n sel.removeAllRanges();\n sel.addRange(this.savedSelection);\n return true;\n } else if (this.doc.getSelection /*&& this.savedSelection.select*/) {\n // this.savedSelection.select();\n return true;\n }\n } else {\n return false;\n }\n }\n\n /**\n * setTimeout used for execute 'saveSelection' method in next event loop iteration\n */\n public executeInNextQueueIteration(callbackFn: (...args: any[]) => any, timeout = 1e2): void {\n setTimeout(callbackFn, timeout);\n }\n\n /** check any selection is made or not */\n private checkSelection(): any {\n\n const selectedText = this.savedSelection.toString();\n\n if (selectedText.length === 0) {\n throw new Error('No Selection Made');\n }\n return true;\n }\n\n /**\n * Upload file to uploadUrl\n * @param file The file\n */\n uploadImage(file: File): Observable<HttpEvent<UploadResponse>> {\n\n const uploadData: FormData = new FormData();\n\n uploadData.append('file', file, file.name);\n\n return this.http.post<UploadResponse>(this.uploadUrl, uploadData, {\n reportProgress: true,\n observe: 'events',\n withCredentials: this.uploadWithCredentials,\n });\n }\n\n /**\n * Insert image with Url\n * @param imageUrl The imageUrl.\n */\n insertImage(imageUrl: string) {\n this.doc.execCommand('insertImage', false, imageUrl);\n }\n\n setDefaultParagraphSeparator(separator: string) {\n this.doc.execCommand('defaultParagraphSeparator', false, separator);\n }\n\n createCustomClass(customClass: CustomClass) {\n let newTag = this.selectedText;\n if (customClass) {\n const tagName = customClass.tag ? customClass.tag : 'span';\n newTag = '<' + tagName + ' class=\"' + customClass.class + '\">' + this.selectedText + '</' + tagName + '>';\n }\n this.insertHtml(newTag);\n }\n\n insertVideo(videoUrl: string) {\n if (videoUrl.match('www.youtube.com')) {\n this.insertYouTubeVideoTag(videoUrl);\n }\n if (videoUrl.match('vimeo.com')) {\n this.insertVimeoVideoTag(videoUrl);\n }\n }\n\n private insertYouTubeVideoTag(videoUrl: string): void {\n const id = videoUrl.split('v=')[1];\n const imageUrl = `https://img.youtube.com/vi/${id}/0.jpg`;\n const thumbnail = `\n <div style='position: relative'>\n <a href='${videoUrl}' target='_blank'>\n <img src=\"${imageUrl}\" alt=\"click to watch\"/>\n <img style='position: absolute; left:200px; top:140px'\n src=\"https://img.icons8.com/color/96/000000/youtube-play.png\"/>\n </a>\n </div>`;\n this.insertHtml(thumbnail);\n }\n\n private insertVimeoVideoTag(videoUrl: string): void {\n const sub = this.http.get<any>(`https://vimeo.com/api/oembed.json?url=${videoUrl}`).subscribe(data => {\n const imageUrl = data.thumbnail_url_with_play_button;\n const thumbnail = `<div>\n <a href='${videoUrl}' target='_blank'>\n <img src=\"${imageUrl}\" alt=\"${data.title}\"/>\n </a>\n </div>`;\n this.insertHtml(thumbnail);\n sub.unsubscribe();\n });\n }\n\n nextNode(node) {\n if (node.hasChildNodes()) {\n return node.firstChild;\n } else {\n while (node && !node.nextSibling) {\n node = node.parentNode;\n }\n if (!node) {\n return null;\n }\n return node.nextSibling;\n }\n }\n\n getRangeSelectedNodes(range, includePartiallySelectedContainers) {\n let node = range.startContainer;\n const endNode = range.endContainer;\n let rangeNodes = [];\n\n // Special case for a range that is contained within a single node\n if (node === endNode) {\n rangeNodes = [node];\n } else {\n // Iterate nodes until we hit the end container\n while (node && node !== endNode) {\n rangeNodes.push( node = this.nextNode(node) );\n }\n\n // Add partially selected nodes at the start of the range\n node = range.startContainer;\n while (node && node !== range.commonAncestorContainer) {\n rangeNodes.unshift(node);\n node = node.parentNode;\n }\n }\n\n // Add ancestors of the range container, if required\n if (includePartiallySelectedContainers) {\n node = range.commonAncestorContainer;\n while (node) {\n rangeNodes.push(node);\n node = node.parentNode;\n }\n }\n\n return rangeNodes;\n }\n\n getSelectedNodes() {\n const nodes = [];\n if (this.doc.getSelection) {\n const sel = this.doc.getSelection();\n for (let i = 0, len = sel.rangeCount; i < len; ++i) {\n nodes.push.apply(nodes, this.getRangeSelectedNodes(sel.getRangeAt(i), true));\n }\n }\n return nodes;\n }\n\n replaceWithOwnChildren(el) {\n const parent = el.parentNode;\n while (el.hasChildNodes()) {\n parent.insertBefore(el.firstChild, el);\n }\n parent.removeChild(el);\n }\n\n removeSelectedElements(tagNames) {\n const tagNamesArray = tagNames.toLowerCase().split(',');\n this.getSelectedNodes().forEach((node) => {\n if (node.nodeType === 1 &&\n tagNamesArray.indexOf(node.tagName.toLowerCase()) > -1) {\n // Remove the node and replace it with its children\n this.replaceWithOwnChildren(node);\n }\n });\n }\n}\n","import { UploadResponse } from './angular-editor.service';\nimport { HttpEvent } from '@angular/common/http';\nimport { Observable } from 'rxjs';\n\nexport interface CustomClass {\n name: string;\n class: string;\n tag?: string;\n}\n\nexport interface Font {\n name: string;\n class: string;\n}\n\nexport interface AngularEditorConfig {\n editable?: boolean;\n spellcheck?: boolean;\n height?: 'auto' | string;\n minHeight?: '0' | string;\n maxHeight?: 'auto' | string;\n width?: 'auto' | string;\n minWidth?: '0' | string;\n translate?: 'yes' | 'now' | string;\n enableToolbar?: boolean;\n showToolbar?: boolean;\n placeholder?: string;\n defaultParagraphSeparator?: string;\n defaultFontName?: string;\n defaultFontSize?: '1' | '2' | '3' | '4' | '5' | '6' | '7' | string;\n uploadUrl?: string;\n upload?: (file: File) => Observable<HttpEvent<UploadResponse>>;\n uploadWithCredentials?: boolean;\n fonts?: Font[];\n customClasses?: CustomClass[];\n sanitize?: boolean;\n toolbarPosition?: 'top' | 'bottom';\n outline?: boolean;\n toolbarHiddenButtons?: string[][];\n rawPaste?: boolean;\n}\n\nexport const angularEditorConfig: AngularEditorConfig = {\n editable: true,\n spellcheck: true,\n height: 'auto',\n minHeight: '0',\n maxHeight: 'auto',\n width: 'auto',\n minWidth: '0',\n translate: 'yes',\n enableToolbar: true,\n showToolbar: true,\n placeholder: 'Enter text here...',\n defaultParagraphSeparator: '',\n defaultFontName: '',\n defaultFontSize: '',\n fonts: [\n {class: 'arial', name: 'Arial'},\n {class: 'times-new-roman', name: 'Times New Roman'},\n {class: 'calibri', name: 'Calibri'},\n {class: 'comic-sans-ms', name: 'Comic Sans MS'}\n ],\n uploadUrl: 'v1/image',\n uploadWithCredentials: false,\n sanitize: true,\n toolbarPosition: 'top',\n outline: true,\n /*toolbarHiddenButtons: [\n ['bold', 'italic', 'underline', 'strikeThrough', 'superscript', 'subscript'],\n ['heading', 'fontName', 'fontSize', 'color'],\n ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull', 'indent', 'outdent'],\n ['cut', 'copy', 'delete', 'removeFormat', 'undo', 'redo'],\n ['paragraph', 'blockquote', 'removeBlockquote', 'horizontalLine', 'orderedList', 'unorderedList'],\n ['link', 'unlink', 'image', 'video']\n ]*/\n};\n","export function isDefined(value: any) {\n return value !== undefined && value !== null;\n}\n","import {\n Attribute,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef, HostBinding,\n HostListener,\n Input,\n OnInit,\n Output,\n Renderer2,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {isDefined} from '../utils';\n\nexport interface SelectOption {\n label: string;\n value: string;\n}\n\n@Component({\n selector: 'ae-select',\n templateUrl: './ae-select.component.html',\n styleUrls: ['./ae-select.component.scss'],\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AeSelectComponent),\n multi: true,\n }\n ]\n})\nexport class AeSelectComponent implements OnInit, ControlValueAccessor {\n @Input() options: SelectOption[] = [];\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('hidden') isHidden: boolean;\n\n selectedOption: SelectOption;\n disabled = false;\n optionId = 0;\n\n get label(): string {\n return this.selectedOption && this.selectedOption.hasOwnProperty('label') ? this.selectedOption.label : 'Select';\n }\n\n opened = false;\n\n get value(): string {\n return this.selectedOption.value;\n }\n\n @HostBinding('style.display') hidden = 'inline-block';\n\n // eslint-disable-next-line @angular-eslint/no-output-native, @angular-eslint/no-output-rename\n @Output('change') changeEvent = new EventEmitter();\n\n @ViewChild('labelButton', {static: true}) labelButton: ElementRef;\n\n constructor(private elRef: ElementRef,\n private r: Renderer2,\n ) {}\n\n ngOnInit() {\n this.selectedOption = this.options[0];\n if (isDefined(this.isHidden) && this.isHidden) {\n this.hide();\n }\n }\n\n hide() {\n this.hidden = 'none';\n }\n\n optionSelect(option: SelectOption, event: MouseEvent) {\n event.stopPropagation();\n this.setValue(option.value);\n this.onChange(this.selectedOption.value);\n this.changeEvent.emit(this.selectedOption.value);\n this.onTouched();\n this.opened = false;\n }\n\n toggleOpen(event: MouseEvent) {\n // event.stopPropagation();\n if (this.disabled) {\n return;\n }\n this.opened = !this.opened;\n }\n\n @HostListener('document:click', ['$event'])\n onClick($event: MouseEvent) {\n if (!this.elRef.nativeElement.contains($event.target)) {\n this.close();\n }\n }\n\n close() {\n this.opened = false;\n }\n\n get isOpen(): boolean {\n return this.opened;\n }\n\n writeValue(value) {\n if (!value || typeof value !== 'string') {\n return;\n }\n this.setValue(value);\n }\n\n setValue(value) {\n let index = 0;\n const selectedEl = this.options.find((el, i) => {\n index = i;\n return el.value === value;\n });\n if (selectedEl) {\n this.selectedOption = selectedEl;\n this.optionId = index;\n }\n }\n\n onChange: any = () => {\n }\n onTouched: any = () => {\n }\n\n registerOnChange(fn) {\n this.onChange = fn;\n }\n\n registerOnTouched(fn) {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.labelButton.nativeElement.disabled = isDisabled;\n const div = this.labelButton.nativeElement;\n const action = isDisabled ? 'addClass' : 'removeClass';\n this.r[action](div, 'disabled');\n this.disabled = isDisabled;\n }\n\n @HostListener('keydown', ['$event'])\n handleKeyDown($event: KeyboardEvent) {\n if (!this.opened) {\n return;\n }\n // console.log($event.key);\n // if (KeyCode[$event.key]) {\n switch ($event.key) {\n case 'ArrowDown':\n this._handleArrowDown($event);\n break;\n case 'ArrowUp':\n this._handleArrowUp($event);\n break;\n case 'Space':\n this._handleSpace($event);\n break;\n case 'Enter':\n this._handleEnter($event);\n break;\n case 'Tab':\n this._handleTab($event);\n break;\n case 'Escape':\n this.close();\n $event.preventDefault();\n break;\n case 'Backspace':\n this._handleBackspace();\n break;\n }\n // } else if ($event.key && $event.key.length === 1) {\n // this._keyPress$.next($event.key.toLocaleLowerCase());\n // }\n }\n\n _handleArrowDown($event) {\n if (this.optionId < this.options.length - 1) {\n this.optionId++;\n }\n }\n\n _handleArrowUp($event) {\n if (this.optionId >= 1) {\n this.optionId--;\n }\n }\n\n _handleSpace($event) {\n\n }\n\n _handleEnter($event) {\n this.optionSelect(this.options[this.optionId], $event);\n }\n\n _handleTab($event) {\n\n }\n\n _handleBackspace() {\n\n }\n}\n","<span class=\"ae-font ae-picker\" [ngClass]=\"{'ae-expanded':isOpen}\">\n <button [tabIndex]=\"-1\" #labelButton tabindex=\"0\" type=\"button\" role=\"button\" class=\"ae-picker-label\" (click)=\"toggleOpen($event);\">{{label}}\n <svg viewBox=\"0 0 18 18\">\n <!-- <use x=\"0\" y=\"0\" xlink:href=\"../assets/icons.svg#hom\"></use>-->\n <polygon class=\"ae-stroke\" points=\"7 11 9 13 11 11 7 11\"></polygon>\n <polygon class=\"ae-stroke\" points=\"7 7 9 5 11 7 7 7\"></polygon>\n </svg>\n </button>\n <span class=\"ae-picker-options\">\n <button tabindex=\"-1\" type=\"button\" role=\"button\" class=\"ae-picker-item\"\n *ngFor=\"let item of options; let i = index\"\n [ngClass]=\"{'selected': item.value === value, 'focused': i === optionId}\"\n (click)=\"optionSelect(item, $event)\">\n {{item.label}}\n </button>\n <span class=\"dropdown-item\" *ngIf=\"!options.length\">No items for select</span>\n </span>\n</span>\n","import {Component, ElementRef, EventEmitter, Inject, Input, Output, Renderer2, ViewChild} from '@angular/core';\nimport {AngularEditorService, UploadResponse} from './angular-editor.service';\nimport {HttpResponse, HttpEvent} from '@angular/common/http';\nimport {DOCUMENT} from '@angular/common';\nimport { CustomClass, Font} from './config';\nimport {SelectOption} from './ae-select/ae-select.component';\nimport { Observable } from 'rxjs';\n\n@Component({\n selector: 'angular-editor-toolbar',\n templateUrl: './angular-editor-toolbar.component.html',\n styleUrls: ['./angular-editor-toolbar.component.scss'],\n})\n\nexport class AngularEditorToolbarComponent {\n htmlMode = false;\n linkSelected = false;\n block = 'default';\n fontName = 'Times New Roman';\n fontSize = '3';\n foreColour;\n backColor;\n\n headings: SelectOption[] = [\n {\n label: 'Heading 1',\n value: 'h1',\n },\n {\n label: 'Heading 2',\n value: 'h2',\n },\n {\n label: 'Heading 3',\n value: 'h3',\n },\n {\n label: 'Heading 4',\n value: 'h4',\n },\n {\n label: 'Heading 5',\n value: 'h5',\n },\n {\n label: 'Heading 6',\n value: 'h6',\n },\n {\n label: 'Heading 7',\n value: 'h7',\n },\n {\n label: 'Paragraph',\n value: 'p',\n },\n {\n label: 'Predefined',\n value: 'pre'\n },\n {\n label: 'Standard',\n value: 'div'\n },\n {\n label: 'default',\n value: 'default'\n }\n ];\n\n fontSizes: SelectOption[] = [\n {\n label: '1',\n value: '1',\n },\n {\n label: '2',\n value: '2',\n },\n {\n label: '3',\n value: '3',\n },\n {\n label: '4',\n value: '4',\n },\n {\n label: '5',\n value: '5',\n },\n {\n label: '6',\n value: '6',\n },\n {\n label: '7',\n value: '7',\n }\n ];\n\n customClassId = '-1';\n // eslint-disable-next-line @typescript-eslint/naming-convention, no-underscore-dangle, id-blacklist, id-match\n _customClasses: CustomClass[];\n customClassList: SelectOption[] = [{label: '', value: ''}];\n // uploadUrl: string;\n\n tagMap = {\n BLOCKQUOTE: 'indent',\n A: 'link'\n };\n\n select = ['H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'P', 'PRE', 'DIV'];\n\n buttons = ['bold', 'italic', 'underline', 'strikeThrough', 'subscript', 'superscript', 'justifyLeft', 'justifyCenter',\n 'justifyRight', 'justifyFull', 'indent', 'outdent', 'insertUnorderedList', 'insertOrderedList', 'link'];\n\n @Input() id: string;\n @Input() uploadUrl: string;\n @Input() upload: (file: File) => Observable<HttpEvent<UploadResponse>>;\n @Input() showToolbar: boolean;\n\n _fonts: Font[];\n fontsList: SelectOption[] = [{ label: '', value: '' }];\n @Input()\n set fonts(fonts: Font[]) { \n if (fonts) {\n this._fonts = fonts;\n this.fontsList = this._fonts.map((x, i) => ({ label: x.name, value: x.name }));\n }\n }\n\n @Input()\n set customClasses(classes: CustomClass[]) {\n if (classes) {\n this._customClasses = classes;\n this.customClassList = this._customClasses.map((x, i) => ({label: x.name, value: i.toString()}));\n this.customClassList.unshift({label: 'Clear Class', value: '-1'});\n }\n }\n\n @Input()\n set defaultFontName(value: string) {\n if (value) {\n this.fontName = value;\n }\n }\n\n @Input()\n set defaultFontSize(value: string) {\n if (value) {\n this.fontSize = value;\n }\n }\n\n @Input() hiddenButtons: string[][];\n\n @Output() execute: EventEmitter<string> = new EventEmitter<string>();\n\n @ViewChild('fileInput', {static: true}) myInputFile: ElementRef;\n\n public get isLinkButtonDisabled(): boolean {\n return this.htmlMode || !Boolean(this.editorService.selectedText);\n }\n\n constructor(\n private r: Renderer2,\n private editorService: AngularEditorService,\n private er: ElementRef,\n @Inject(DOCUMENT) private doc: any\n ) {\n }\n\n /**\n * Trigger command from editor header buttons\n * @param command string from toolbar buttons\n */\n triggerCommand(command: string) {\n this.execute.emit(command);\n }\n\n /**\n * highlight editor buttons when cursor moved or positioning\n */\n triggerButtons() {\n if (!this.showToolbar) {\n return;\n }\n this.buttons.forEach(e => {\n const result = this.doc.queryCommandState(e);\n const elementById = this.doc.getElementById(e + '-' + this.id);\n if (result) {\n this.r.addClass(elementById, 'active');\n } else {\n this.r.removeClass(elementById, 'active');\n }\n });\n }\n\n /**\n * trigger highlight editor buttons when cursor moved or positioning in block\n */\n triggerBlocks(nodes: Node[]) {\n if (!this.showToolbar) {\n return;\n }\n this.linkSelected = nodes.findIndex(x => x.nodeName === 'A') > -1;\n let found = false;\n this.select.forEach(y => {\n const node = nodes.find(x => x.nodeName === y);\n if (node !== undefined && y === node.nodeName) {\n if (found === false) {\n this.block = node.nodeName.toLowerCase();\n found = true;\n }\n } else if (found === false) {\n this.block = 'default';\n }\n });\n\n found = false;\n if (this._customClasses) {\n this._customClasses.forEach((y, index) => {\n const node = nodes.find(x => {\n if (x instanceof Element) {\n return x.className === y.class;\n }\n });\n if (node !== undefined) {\n if (found === false) {\n this.customClassId = index.toString();\n found = true;\n }\n } else if (found === false) {\n this.customClassId = '-1';\n }\n });\n }\n\n Object.keys(this.tagMap).map(e => {\n const elementById = this.doc.getElementById(this.tagMap[e] + '-' + this.id);\n const node = nodes.find(x => x.nodeName === e);\n if (node !== undefined && e === node.nodeName) {\n this.r.addClass(elementById, 'active');\n } else {\n this.r.removeClass(elementById, 'active');\n }\n });\n\n this.foreColour = this.doc.queryCommandValue('ForeColor');\n this.fontSize = this.doc.queryCommandValue('FontSize');\n this.fontName = this.doc.queryCommandValue('FontName').replace(/\"/g, '');\n this.backColor = this.doc.queryCommandValue('backColor');\n }\n\n /**\n * insert URL link\n */\n insertUrl() {\n let url = 'https:\\/\\/';\n const selection = this.editorService.savedSelection;\n if (selection && selection.commonAncestorContainer.parentElement.nodeName === 'A') {\n const parent = selection.commonAncestorContainer.parentElement as HTMLAnchorElement;\n if (parent.href !== '') {\n url = parent.href;\n }\n }\n url = prompt('Insert URL link', url);\n if (url && url !== '' && url !== 'https://') {\n this.editorService.createLink(url);\n }\n }\n\n /**\n * insert Video link\n */\n insertVideo() {\n this.execute.emit('');\n const url = prompt('Insert Video link', `https://`);\n if (url && url !== '' && url !== `https://`) {\n this.editorService.insertVideo(url);\n }\n }\n\n /** insert color */\n insertColor(color: string, where: string) {\n this.editorService.insertColor(color, where);\n this.execute.emit('');\n }\n\n /**\n * set font Name/family\n * @param foreColor string\n */\n setFontName(foreColor: string): void {\n this.editorService.setFontName(foreColor);\n this.execute.emit('');\n }\n\n /**\n * set font Size\n * @param fontSize string\n */\n setFontSize(fontSize: string): void {\n this.editorService.setFontSize(fontSize);\n this.execute.emit('');\n }\n\n /**\n * toggle editor mode (WYSIWYG or SOURCE)\n * @param m boolean\n */\n setEditorMode(m: boolean) {\n const toggleEditorModeButton = this.doc.getElementById('toggleEditorMode' + '-' + this.id);\n if (m) {\n this.r.addClass(toggleEditorModeButton, 'active');\n } else {\n this.r.removeClass(toggleEditorModeButton, 'active');\n }\n this.htmlMode = m;\n }\n\n /**\n * Upload image when file is selected.\n */\n onFileChanged(event) {\n const file = event.target.files[0];\n if (file.type.includes('image/')) {\n if (this.upload) {\n this.upload(file).subscribe((response: HttpResponse<UploadResponse>) => this.watchUploadImage(response, event));\n } else if (this.uploadUrl) {\n this.editorService.uploadImage(file).subscribe((response: HttpResponse<UploadResponse>) => this.watchUploadImage(response, event));\n } else {\n const reader = new FileReader();\n reader.onload = (e: ProgressEvent) => {\n const fr = e.currentTarget as FileReader;\n this.editorService.insertImage(fr.result.toString());\n };\n reader.readAsDataURL(file);\n }\n }\n }\n\n watchUploadImage(response: HttpResponse<{imageUrl: string}>, event) {\n const { imageUrl } = response.body;\n this.editorService.insertImage(imageUrl);\n event.srcElement.value = null;\n }\n\n /**\n * Set custom class\n */\n setCustomClass(classId: string) {\n if (classId === '-1') {\n this.execute.emit('clear');\n } else {\n this.editorService.createCustomClass(this._customClasses[+classId]);\n }\n }\n\n isButtonHidden(name: string): boolean {\n if (!name) {\n return false;\n }\n if (!(this.hiddenButtons instanceof Array)) {\n return false;\n }\n let result: any;\n for (const arr of this.hiddenButtons) {\n if (arr instanceof Array) {\n result = arr.find(item => item === name);\n }\n if (result) {\n break;\n }\n }\n return result !== undefined;\n }\n\n focus() {\n this.execute.emit('focus');\n console.log('focused');\n }\n}\n","<div class=\"angular-editor-toolbar\" *ngIf=\"showToolbar\">\n <div class=\"angular-editor-toolbar-set\">\n <button type=\"button\" title=\"Undo\" class=\"angular-editor-button\" (click)=\"triggerCommand('undo')\"\n [hidden]=\"isButtonHidden('undo')\" tabindex=\"-1\"><i\n class='fa fa-undo'></i></button>\n <button type=\"button\" title=\"Redo\" class=\"angular-editor-button\" (click)=\"triggerCommand('redo')\"\n [hidden]=\"isButtonHidden('redo')\" tabindex=\"-1\"><i\n class='fa fa-repeat'></i></button>\n </div>\n <div class=\"angular-editor-toolbar-set\">\n <button [id]=\"'bold-'+id\" type=\"button\" title=\"Bold\" class=\"angular-editor-button\" (click)=\"triggerCommand('bold')\"\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('bold')\" tabindex=\"-1\"><i class='fa fa-bold'></i></button>\n <button [id]=\"'italic-'+id\" type=\"button\" title=\"Italic\" class=\"angular-editor-button\"\n (click)=\"triggerCommand('italic')\"\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('italic')\" tabindex=\"-1\"><i class='fa fa-italic'></i>\n </button>\n <button [id]=\"'underline-'+id\" type=\"button\" title=\"Underline\" class=\"angular-editor-button\"\n (click)=\"triggerCommand('underline')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('underline')\"\n tabindex=\"-1\"><i class='fa fa-underline'></i></button>\n <button [id]=\"'strikeThrough-'+id\" type=\"button\" title=\"Strikethrough\" class=\"angular-editor-button\"\n (click)=\"triggerCommand('strikeThrough')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('strikeThrough')\"\n tabindex=\"-1\"><i class='fa fa-strikethrough'></i></button>\n <button [id]=\"'subscript-'+id\" type=\"button\" title=\"Subscript\" class=\"angular-editor-button\"\n (click)=\"triggerCommand('subscript')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('subscript')\"\n tabindex=\"-1\"><i class='fa fa-subscript'></i></button>\n <button [id]=\"'superscript-'+id\" type=\"button\" title=\"Superscript\" class=\"angular-editor-button\"\n (click)=\"triggerCommand('superscript')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('superscript')\"\n tabindex=\"-1\"><i class='fa fa-superscript'></i></button>\n </div>\n <div class=\"angular-editor-toolbar-set\">\n <button [id]=\"'justifyLeft-'+id\" type=\"button\" title=\"Justify Left\" class=\"angular-editor-button\"\n (click)=\"triggerCommand('justifyLeft')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('justifyLeft')\"\n tabindex=\"-1\"><i\n class='fa fa-align-left'></i></button>\n <button [id]=\"'justifyCenter-'+id\" type=\"button\" title=\"Justify Center\" class=\"angular-editor-button\"\n (click)=\"triggerCommand('justifyCenter')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('justifyCenter')\"\n tabindex=\"-1\"><i\n class='fa fa-align-center'></i></button>\n <button [id]=\"'justifyRight-'+id\" type=\"button\" title=\"Justify Right\" class=\"angular-editor-button\"\n (click)=\"triggerCommand('justifyRight')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('justifyRight')\"\n tabindex=\"-1\">\n <i class='fa fa-align-right'></i></button>\n <button [id]=\"'justifyFull-'+id\" type=\"button\" title=\"Justify Full\" class=\"angular-editor-button\"\n (click)=\"triggerCommand('justifyFull')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('justifyFull')\"\n tabindex=\"-1\"><i\n class='fa fa-align-justify'></i></button>\n </div>\n <div class=\"angular-editor-toolbar-set\">\n <button [id]=\"'indent-'+id\" type=\"button\" title=\"Indent\" class=\"angular-editor-button\"\n (click)=\"triggerCommand('indent')\"\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('indent')\" tabindex=\"-1\"><i\n class='fa fa-indent'></i></button>\n <button [id]=\"'outdent-'+id\" type=\"button\" title=\"Outdent\" class=\"angular-editor-button\"\n (click)=\"triggerCommand('outdent')\"\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('outdent')\" tabindex=\"-1\"><i\n class='fa fa-outdent'></i></button>\n </div>\n <div class=\"angular-editor-toolbar-set\">\n <button [id]=\"'insertUnorderedList-'+id\" type=\"button\" title=\"Unordered List\" class=\"angular-editor-button\"\n (click)=\"triggerCommand('insertUnorderedList')\" [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('insertUnorderedList')\" tabindex=\"-1\"><i\n class='fa fa-list-ul'></i></button>\n <button [id]=\"'insertOrderedList-'+id\" type=\"button\" title=\"Ordered List\" class=\"angular-editor-button\"\n (click)=\"triggerCommand('insertOrderedList')\" [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('insertOrderedList')\" tabindex=\"-1\"><i\n class='fa fa-list-ol'></i></button>\n </div>\n <div class=\"angular-editor-toolbar-set\">\n\n <ae-select class=\"select-heading\" [options]=\"headings\"\n [(ngModel)]=\"block\"\n (change)=\"triggerCommand(block)\"\n [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('heading')\"\n tabindex=\"-1\"></ae-select>\n </div>\n <div class=\"angular-editor-toolbar-set\">\n\n <ae-select class=\"select-font\" [options]=\"fontsList\"\n [(ngModel)]=\"fontName\"\n (change)=\"setFontName(fontName)\"\n [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('fontName')\"\n tabindex=\"-1\"></ae-select>\n </div>\n <div class=\"angular-editor-toolbar-set\">\n\n <ae-select class=\"select-font-size\" [options]=\"fontSizes\"\n [(ngModel)]=\"fontSize\"\n (change)=\"setFontSize(fontSize)\"\n [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('fontSize')\"\n tabindex=\"-1\">\n </ae-select>\n </div>\n <div class=\"angular-editor-toolbar-set\">\n <input\n style=\"display: none\"\n type=\"color\" (change)=\"insertColor(fgInput.value, 'textColor')\"\n #fgInput>\n <button [id]=\"'foregroundColorPicker-'+id\" type=\"button\" class=\"angular-editor-button\" (click)=\"focus(); ; fgInput.click()\"\n title=\"Text Color\"\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('textColor')\" tabindex=\"-1\"><span\n class=\"color-label foreground\"><i class=\"fa fa-font\"></i></span>\n </button>\n <input\n style=\"display: none\"\n type=\"color\" (change)=\"insertColor(bgInput.value, 'backgroundColor')\"\n #bgInput>\n <button [id]=\"'backgroundColorPicker-'+id\" type=\"button\" class=\"angular-editor-button\" (click)=\"focus(); ; bgInput.click()\"\n title=\"Background Color\"\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('backgroundColor')\" tabindex=\"-1\"><span\n class=\"color-label background\"><i class=\"fa fa-font\"></i></span>\n </button>\n </div>\n <div *ngIf=\"_customClasses\" class=\"angular-editor-toolbar-set\">\n <ae-select class=\"select-custom-style\" [options]=\"customClassList\"\n [(ngModel)]=\"customClassId\"\n (change)=\"setCustomClass(customClassId)\"\n [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('customClasses')\"\n tabindex=\"-1\"></ae-select>\n </div>\n <div class=\"angular-editor-toolbar-set\">\n <button [id]=\"'link-'+id\" type=\"button\" class=\"angular-editor-button\" (click)=\"insertUrl()\"\n title=\"Insert Link\" [disabled]=\"isLinkButtonDisabled\" [hidden]=\"isButtonHidden('link')\" tabindex=\"-1\">\n <i class=\"fa fa-link\"></i>\n </button>\n <button [id]=\"'unlink-'+id\" type=\"button\" class=\"angular-editor-button\" (click)=\"triggerCommand('unlink')\"\n title=\"Unlink\" [disabled]=\"htmlMode || !linkSelected\" [hidden]=\"isButtonHidden('unlink')\" tabindex=\"-1\">\n <i class=\"fa fa-chain-broken\"></i>\n </button>\n <input\n style=\"display: none\"\n accept=\"image/*\"\n type=\"file\" (change)=\"onFileChanged($event)\"\n #fileInput>\n <button [id]=\"'insertImage-'+id\" type=\"button\" class=\"angular-editor-button\" (click)=\"focus(); fileInput.click()\"\n title=\"Insert Image\"\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('insertImage')\" tabindex=\"-1\"><i class=\"fa fa-image\"></i>\n </button>\n <button [id]=\"'insertVideo-'+id\" type=\"button\" class=\"angular-editor-button\"\n (click)=\"insertVideo()\" title=\"Insert Video\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('insertVideo')\"\n tabindex=\"-1\"><i\n class=\"fa fa-video-camera\"></i></button>\n <button [id]=\"'insertHorizontalRule-'+id\" type=\"button\" title=\"Horizontal Line\" class=\"angular-editor-button\"\n (click)=\"triggerCommand('insertHorizontalRule')\" [disabled]=\"htmlMode\"\n [hidden]=\"isButtonHidden('insertHorizontalRule')\" tabindex=\"-1\"><i\n class=\"fa fa-minus\"></i></button>\n </div>\n <div class=\"angular-editor-toolbar-set\">\n <button [id]=\"'clearFormatting-'+id\" type=\"button\" title=\"Clear Formatting\" class=\"angular-editor-button\"\n (click)=\"triggerCommand('removeFormat')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('removeFormat')\"\n tabindex=\"-1\"><i class='fa fa-remove'></i>\n </button>\n </div>\n <div class=\"angular-editor-toolbar-set\">\n <button [id]=\"'toggleEditorMode-'+id\" type=\"button\" title=\"HTML Code\" class=\"angular-editor-button\"\n (click)=\"triggerCommand('toggleEditorMode')\" [hidden]=\"isButtonHidden('toggleEditorMode')\" tabindex=\"-1\"><i\n class='fa fa-code'></i></button>\n </div>\n</div>\n","import {\n AfterViewInit,\n Attribute,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n Renderer2,\n SecurityContext,\n ViewChild\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {AngularEditorConfig, angularEditorConfig} from './config';\nimport {AngularEditorToolbarComponent} from './angular-editor-toolbar.component';\nimport {AngularEditorService} from './angular-editor.service';\nimport {DOCUMENT} from '@angular/common';\nimport {DomSanitizer} from '@angular/platform-browser';\nimport {isDefined} from './utils';\n\n@Component({\n selector: 'angular-editor',\n templateUrl: './angular-editor.component.html',\n styleUrls: ['./angular-editor.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AngularEditorComponent),\n multi: true\n },\n AngularEditorService\n ]\n})\nexport class AngularEditorComponent implements OnInit, ControlValueAccessor, AfterViewInit, OnDestroy {\n\n private onChange: (value: string) => void;\n private onTouched: () => void;\n\n modeVisual = true;\n showPlaceholder = false;\n disabled = false;\n focused = false;\n touched = false;\n changed = false;\n\n focusInstance: any;\n blurInstance: any;\n\n @Input() id = '';\n @Input() config: AngularEditorConfig = angularEditorConfig;\n @Input() placeholder = '';\n @Input() tabIndex: number | null;\n\n @Output() html;\n\n @ViewChild('editor', {static: true}) textArea: ElementRef;\n @ViewChild('editorWrapper', {static: true}) editorWrapper: ElementRef;\n @ViewChild('editorToolbar') editorToolbar: AngularEditorToolbarComponent;\n\n @Output() viewMode = new EventEmitter<boolean>();\n\n /** emits `blur` event when focused out from the textarea */\n // eslint-disable-next-line @angular-eslint/no-output-native, @angular-eslint/no-output-rename\n @Output('blur') blurEvent: EventEmitter<FocusEvent> = new EventEmitter<FocusEvent>();\n\n /** emits `focus` event when focused in to the textarea */\n // eslint-disable-next-line @angular-eslint/no-output-rename, @angular-eslint/no-output-native\n @Output('focus') focusEvent: EventEmitter<FocusEvent> = new EventEmitter<FocusEvent>();\n\n @HostBinding('attr.tabindex') tabindex = -1;\n\n @HostListener('focus')\n onFocus() {\n this.focus();\n }\n\n constructor(\n private r: Renderer2,\n private editorService: AngularEditorService,\n @Inject(DOCUMENT) private doc: any,\n private sanitizer: DomSanitizer,\n private cdRef: ChangeDetectorRef,\n @Attribute('tabindex') defaultTabIndex: string,\n @Attribute('autofocus') private autoFocus: any\n ) {\n const parsedTabIndex = Number(defaultTabIndex);\n this.tabIndex = (parsedTabIndex || parsedTabIndex === 0) ? parsedTabIndex : null;\n }\n\n ngOnInit() {\n this.config.toolbarPosition = this.config.toolbarPosition ? this.config.toolbarPosition : angularEditorConfig.toolbarPosition;\n }\n\n ngAfterViewInit() {\n if (isDefined(this.autoFocus)) {\n this.focus();\n }\n }\n\n onPaste(event: ClipboardEvent){\n if (this.config.rawPaste) {\n event.preventDefault();\n const text = event.clipboardData.getData('text/plain');\n document.execCommand('insertHTML', false, text);\n return text;\n }\n }\n\n /**\n * Executed command from editor header buttons\n * @param command string from triggerCommand\n */\n executeCommand(command: string) {\n this.focus();\n if (command === 'focus') {\n return;\n }\n if (command === 'toggleEditorMode') {\n this.toggleEditorMode(this.modeVisual);\n } else if (command !== '') {\n if (command === 'clear') {\n this.editorService.removeSelectedElements(this.getCustomTags());\n this.onContentChange(this.textArea.nativeElement);\n } else if (command === 'default') {\n this.editorService.removeSelectedElements('h1,h2,h3,h4,h5,h6,p,pre');\n this.onContentChange(this.textArea.nativeElement);\n } else {\n this.editorService.executeCommand(command);\n }\n this.exec();\n }\n }\n\n /**\n * focus event\n */\n onTextAreaFocus(event: FocusEvent): void {\n if (this.focused) {\n event.stopPropagation();\n return;\n }\n this.focused = true;\n this.focusEvent.emit(event);\n if (!this.touched || !this.changed) {\n this.editorService.executeInNextQueueIteration(() => {\n this.configure();\n this.touched = true;\n });\n }\n }\n\n /**\n * @description fires when cursor leaves textarea\n */\n public onTextAreaMouseOut(event: MouseEvent): void {\n this.editorService.saveSelection();\n }\n\n /**\n * blur event\n */\n onTextAreaBlur(event: FocusEvent) {\n /**\n * save selection if focussed out\n */\n this.editorService.executeInNextQueueIteration(this.editorService.saveSelection);\n\n if (typeof this.onTouched === 'function') {\n this.onTouched();\n }\n\n if (event.relatedTarget !== null) {\n const parent = (event.relatedTarget as HTMLElement).parentElement;\n if (!parent.classList.contains('angular-editor-toolbar-set') && !parent.classList.contains('ae-picker')) {\n this.blurEvent.emit(event);\n this.focused = false;\n }\n }\n }\n\n /**\n * focus the text area when the editor is focused\n */\n focus() {\n if (this.modeVisual) {\n this.textArea.nativeElement.focus();\n } else {\n const sourceText = this.doc.getElementById('sourceText' + this.id);\n sourceText.focus();\n this.focused = true;\n }\n }\n\n /**\n * Executed from the contenteditable section while the input property changes\n * @param element html element from contenteditable\n */\n onContentChange(element: HTMLElement): void {\n let html = '';\n if (this.modeVisual) {\n html = element.innerHTML;\n } else {\n html = element.innerText;\n }\n if ((!html || html === '<br>')) {\n html = '';\n }\n if (typeof this.onChange === 'function') {\n this.onChange(this.config.sanitize || this.config.sanitize === undefined ?\n this.sanitizer.sanitize(SecurityContext.HTML, html) : html);\n if ((!html) !== this.showPlaceholder) {\n this.togglePlaceholder(this.showPlaceholder);\n }\n }\n this.changed = true;\n }\n\n /**\n * Set the function to be called\n * when the control receives a change event.\n *\n * @param fn a function\n */\n registerOnChange(fn: any): void {\n this.onChange = e => (e === '<br>' ? fn('') : fn(e)) ;\n }\n\n /**\n * Set the function to be called\n * when the control receives a touch event.\n *\n * @param fn a function\n */\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n /**\n * Write a new value to the element.\n *\n * @param value value to be executed when there is a change in contenteditable\n */\n writeValue(value: any): void {\n\n if ((!value || value === '<br>' || value === '') !== this.showPlaceholder) {\n this.togglePlaceholder(this.showPlaceholder);\n }\n\n if (value === undefined || value === '' || value === '<br>') {\n value = null;\n }\n\n this.refreshView(value);\n }\n\n /**\n * refresh view/HTML of the editor\n *\n * @param value html string from the editor\n */\n refreshView(value: string): void {\n const normalizedValue = value === null ? '' : value;\n this.r.setProperty(this.textArea.nativeElement, 'innerHTML', normalizedValue);\n\n return;\n }\n\n /**\n * toggles placeholder based on input string\n *\n * @param value A HTML string from the editor\n */\n togglePlaceholder(value: boolean): void {\n if (!value) {\n this.r.addClass(this.editorWrapper.nativeElement, 'show-placeholder');\n this.showPlaceholder = true;\n\n } else {\n this.r.removeClass(this.editorWrapper.nativeElement, 'show-placeholder');\n this.showPlaceholder = false;\n }\n }\n\n /**\n * Implements disabled state for this element\n *\n * @param isDisabled Disabled flag\n */\n setDisabledState(isDisabled: boolean): void {\n const div = this.textArea.nativeElement;\n const action = isDisabled ? 'addClass' : 'removeClass';\n this.r[action](div, 'disabled');\n this.disabled = isDisabled;\n }\n\n /**\n * toggles editor mode based on bToSource bool\n *\n * @param bToSource A boolean value from the editor\n */\n toggleEditorMode(bToSource: boolean) {\n let oContent: any;\n const editableElement = this.textArea.nativeElement;\n\n if (bToSource) {\n oContent = this.r.createText(editableElement.innerHTML);\n this.r.setProperty(editableElement, 'innerHTML', '');\n this.r.setProperty(editableElement, 'contentEditable', false);\n\n const oPre = this.r.createElement('pre');\n this.r.setStyle(oPre, 'margin', '0');\n this.r.setStyle(oPre, 'outline', 'none');\n\n const oCode = this.r.createElement('code');\n this.r.setProperty(oCode, 'id', 'sourceText' + this.id);\n this.r.setStyle(oCode, 'display', 'block');\n this.r.setStyle(oCode, 'white-space', 'pre-wrap');\n this.r.setStyle(oCode, 'word-break', 'keep-all');\n this.r.setStyle(oCode, 'outline', 'none');\n this.r.setStyle(oCode, 'margin', '0');\n this.r.setStyle(oCode, 'background-color', '#fff5b9');\n this.r.setProperty(oCode, 'contentEditable', true);\n this.r.appendChild(oCode, oContent);\n this.focusInstance = this.r.listen(oCode, 'focus', (event) => this.onTextAreaFocus(event));\n this.blurInstance = this.r.listen(oCode, 'blur', (event) => this.onTextAreaBlur(event));\n this.r.appendChild(oPre, oCode);\n this.r.appendChild(editableElement, oPre);\n\n // ToDo move to service\n this.doc.execCommand('defaultParagraphSeparator', false, 'div');\n\n this.modeVisual = false;\n this.viewMode.emit(false);\n oCode.focus();\n } else {\n if (this.doc.querySelectorAll) {\n this.r.setProperty(editableElement, 'innerHTML', editableElement.innerText);\n } else {\n oContent = this.doc.createRange();\n oContent.selectNodeContents(editableElement.firstChild);\n this.r.setProperty(editableElement, 'innerHTML', oContent.toString());\n }\n this.r.setProperty(editableElement, 'contentEditable', true);\n this.modeVisual = true;\n this.viewMode.emit(true);\n this.onContentChange(editableElement);\n editableElement.focus();\n }\n this.editorToolbar.setEditorMode(!this.modeVisual);\n }\n\n /**\n * toggles editor buttons when cursor moved or positioning\n *\n * Send a node array from the contentEditable of the editor\n */\n exec() {\n this.editorToolbar.triggerButtons();\n\n let userSelection;\n if (this.doc.getSelection) {\n userSelection = this.doc.getSelection();\n this.editorService.executeInNextQueueIteration(this.editorService.saveSelection);\n }\n\n let a = userSelection.focusNode;\n const els = [];\n while (a && a.id !== 'editor') {\n els.unshift(a);\n a = a.parentNode;\n }\n this.editorToolbar.triggerBlocks(els);\n }\n\n private configure() {\n this.editorService.uploadUrl = this.config.uploadUrl;\n this.editorService.uploadWithCredentials = this.config.uploadWithCredentials;\n if (this.config.defaultParagraphSeparator) {\n this.editorService.setDefaultParagraphSeparator(this.config.defaultParagraphSeparator);\n }\n if (this.config.defaultFontName) {\n this.editorService.setFontName(this.config.defaultFontName);\n }\n if (this.config.defaultFontSize) {\n this.editorService.setFontSize(this.config.defaultFontSize);\n }\n }\n\n getFonts() {\n const fonts = this.config.fonts ? this.config.fonts : angularEditorConfig.fonts;\n return fonts;\n }\n\n getCustomTags() {\n const tags = ['span'];\n this.config.customClasses.forEach(x => {\n if (x.tag !== undefined) {\n if (!tags.includes(x.tag)) {\n tags.push(x.tag);\n }\n }\n });\n return tags.join(',');\n }\n\n ngOnDestroy() {\n if (this.blurInstance) {\n this.blurInstance();\n }\n if (this.focusInstance) {\n this.focusInstance();\n }\n }\n\n filterStyles(html: string): string {\n html = html.replace('position: fixed;', '');\n return html;\n }\n}\n","<div\n class=\"angular-editor\"\n #angularEditor\n [style.width]=\"config.width\"\n [style.minWidth]=\"config.minWidth\"\n>\n <angular-editor-toolbar\n *ngIf=\"config.toolbarPosition === 'top'\"\n #editorToolbar\n [id]=\"id\"\n [uploadUrl]=\"config.uploadUrl\"\n [upload]=\"config.upload\"\n [showToolbar]=\"config.showToolbar !== undefined ? config.showToolbar : true\"\n [fonts]=\"getFonts()\"\n [customClasses]=\"config.customClasses\"\n [defaultFontName]=\"config.defaultFontName\"\n [defaultFontSize]=\"config.defaultFontSize\"\n [hiddenButtons]=\"config.toolbarHiddenButtons\"\n (execute)=\"executeCommand($event)\"\n ></angular-editor-toolbar>\n\n <div\n class=\"angular-editor-wrapper\"\n #editorWrapper\n >\n <div\n #editor\n class=\"angular-editor-textarea\"\n [attr.contenteditable]=\"config.editable\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\n [attr.translate]=\"config.translate\"\n [attr.spellcheck]=\"config.spellcheck\"\n [style.height]=\"config.height\"\n [style.minHeight]=\"config.minHeight\"\n [style.maxHeight]=\"config.maxHeight\"\n [style.outline]=\"config.outline === false ? 'none': undefined\"\n (input)=\"onContentChange($event.target)\"\n (focus)=\"onTextAreaFocus($event)\"\n (blur)=\"onTextAreaBlur($event)\"\n (click)=\"exec()\"\n (keyup)=\"exec()\"\n (mouseout)=\"onTextAreaMouseOut($event)\"\n (paste)=\"onPaste($event)\"\n >\n </div>\n <span class=\"angular-editor-placeholder\">{{ placeholder || config['placeholder'] }}</span>\n </div>\n <angular-editor-toolbar\n *ngIf=\"config.toolbarPosition === 'bottom'\"\n #editorToolbar\n [id]=\"id\"\n [uploadUrl]=\"config.uploadUrl\"\n [upload]=\"config.upload\"\n [showToolbar]=\"config.showToolbar !== undefined ? config.showToolbar : true\"\n [fonts]=\"getFonts()\"\n [customClasses]=\"config.customClasses\"\n [defaultFontName]=\"config.defaultFontName\"\n [defaultFontSize]=\"config.defaultFontSize\"\n [hiddenButtons]=\"config.toolbarHiddenButtons\"\n (execute)=\"executeCommand($event)\"\n ></angular-editor-toolbar>\n</div>\n","import {NgModule} from '@angular/core';\nimport {AngularEditorComponent} from './angular-editor.component';\nimport {AngularEditorToolbarComponent} from './angular-editor-toolbar.component';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {CommonModule} from '@angular/common';\nimport { AeSelectComponent } from './ae-select/ae-select.component';\n\n@NgModule({\n imports: [\n CommonModule, FormsModule, ReactiveFormsModule\n ],\n declarations: [AngularEditorComponent, AngularEditorToolbarComponent, AeSelectComponent],\n exports: [AngularEditorComponent, AngularEditorToolbarComponent]\n})\nexport class AngularEditorModule {\n}\n","/*\n * Public API Surface of angular-editor\n */\n\nexport * from './lib/angular-editor.service';\nexport * from './lib/angular-editor.component';\nexport * from './lib/angular-editor-toolbar.component';\nexport * from './lib/angular-editor.module';\nexport { AngularEditorConfig, CustomClass } from './lib/config';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAWa,oBAAoB;IAO/B,YACU,IAAgB,EACE,GAAQ;QAD1B,SAAI,GAAJ,IAAI,CAAY;QACE,QAAG,GAAH,GAAG,CAAK;;;;QA8E7B,kBAAa,GAAG;YACrB,IAAI,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE;gBACzB,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;gBACpC,IAAI,GAAG,CAAC,UAAU,IAAI,GAAG,CAAC,UAAU,EAAE;oBACpC,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;oBACxC,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC;iBACpC;aACF;iBAAM,IAAI,IAAI,CAAC,GAAG,CAAC,YAAY,IAAI,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE;gBACxD,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;aAC9C;iBAAM;gBACL,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;aAC5B;SACF,CAAA;KAzFI;;;;;IAML,cAAc,CAAC,OAAe;QAC5B,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;QAClE,IAAI,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;YAC9B,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,aAAa,EAAE,KAA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BAA6B;iHAEpD,mBAAmB,YANrB;YACP,YAAY,EAAE,WAAW,EAAE,mBAAmB;SAC/C;2FAIU,mBAAmB;kBAP/B,QAAQ;mBAAC;oBACR,OAAO,EAAE;wBACP,YAAY,EAAE,WAAW,EAAE,mBAAmB;qBAC/C;oBACD,YAAY,EAAE,CAAC,sBAAsB,EAAE,6BAA6B,EAAE,iBAAiB,CAAC;oBACxF,OAAO,EAAE,CAAC,sBAAsB,EAAE,6BAA6B,CAAC;iBACjE;;;ACbD;;;;ACAA;;;;;;"}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { ElementRef, EventEmitter, OnInit, Renderer2 } from '@angular/core';
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export interface SelectOption {
|
5
|
+
label: string;
|
6
|
+
value: string;
|
7
|
+
}
|
8
|
+
export declare class AeSelectComponent implements OnInit, ControlValueAccessor {
|
9
|
+
private elRef;
|
10
|
+
private r;
|
11
|
+
options: SelectOption[];
|
12
|
+
isHidden: boolean;
|
13
|
+
selectedOption: SelectOption;
|
14
|
+
disabled: boolean;
|
15
|
+
optionId: number;
|
16
|
+
get label(): string;
|
17
|
+
opened: boolean;
|
18
|
+
get value(): string;
|
19
|
+
hidden: string;
|
20
|
+
changeEvent: EventEmitter<any>;
|
21
|
+
labelButton: ElementRef;
|
22
|
+
constructor(elRef: ElementRef, r: Renderer2);
|
23
|
+
ngOnInit(): void;
|
24
|
+
hide(): void;
|
25
|
+
optionSelect(option: SelectOption, event: MouseEvent): void;
|
26
|
+
toggleOpen(event: MouseEvent): void;
|
27
|
+
onClick($event: MouseEvent): void;
|
28
|
+
close(): void;
|
29
|
+
get isOpen(): boolean;
|
30
|
+
writeValue(value: any): void;
|
31
|
+
setValue(value: any): void;
|
32
|
+
onChange: any;
|
33
|
+
onTouched: any;
|
34
|
+
registerOnChange(fn: any): void;
|
35
|
+
registerOnTouched(fn: any): void;
|
36
|
+
setDisabledState(isDisabled: boolean): void;
|
37
|
+
handleKeyDown($event: KeyboardEvent): void;
|
38
|
+
_handleArrowDown($event: any): void;
|
39
|
+
_handleArrowUp($event: any): void;
|
40
|
+
_handleSpace($event: any): void;
|
41
|
+
_handleEnter($event: any): void;
|
42
|
+
_handleTab($event: any): void;
|
43
|
+
_handleBackspace(): void;
|
44
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AeSelectComponent, never>;
|
45
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AeSelectComponent, "ae-select", never, { "options": "options"; "isHidden": "hidden"; }, { "changeEvent": "change"; }, never, never>;
|
46
|
+
}
|
@@ -0,0 +1,99 @@
|
|
1
|
+
import { ElementRef, EventEmitter, Renderer2 } from '@angular/core';
|
2
|
+
import { AngularEditorService, UploadResponse } from './angular-editor.service';
|
3
|
+
import { HttpResponse, HttpEvent } from '@angular/common/http';
|
4
|
+
import { CustomClass, Font } from './config';
|
5
|
+
import { SelectOption } from './ae-select/ae-select.component';
|
6
|
+
import { Observable } from 'rxjs';
|
7
|
+
import * as i0 from "@angular/core";
|
8
|
+
export declare class AngularEditorToolbarComponent {
|
9
|
+
private r;
|
10
|
+
private editorService;
|
11
|
+
private er;
|
12
|
+
private doc;
|
13
|
+
htmlMode: boolean;
|
14
|
+
linkSelected: boolean;
|
15
|
+
block: string;
|
16
|
+
fontName: string;
|
17
|
+
fontSize: string;
|
18
|
+
foreColour: any;
|
19
|
+
backColor: any;
|
20
|
+
headings: SelectOption[];
|
21
|
+
fontSizes: SelectOption[];
|
22
|
+
customClassId: string;
|
23
|
+
_customClasses: CustomClass[];
|
24
|
+
customClassList: SelectOption[];
|
25
|
+
tagMap: {
|
26
|
+
BLOCKQUOTE: string;
|
27
|
+
A: string;
|
28
|
+
};
|
29
|
+
select: string[];
|
30
|
+
buttons: string[];
|
31
|
+
id: string;
|
32
|
+
uploadUrl: string;
|
33
|
+
upload: (file: File) => Observable<HttpEvent<UploadResponse>>;
|
34
|
+
showToolbar: boolean;
|
35
|
+
_fonts: Font[];
|
36
|
+
fontsList: SelectOption[];
|
37
|
+
set fonts(fonts: Font[]);
|
38
|
+
set customClasses(classes: CustomClass[]);
|
39
|
+
set defaultFontName(value: string);
|
40
|
+
set defaultFontSize(value: string);
|
41
|
+
hiddenButtons: string[][];
|
42
|
+
execute: EventEmitter<string>;
|
43
|
+
myInputFile: ElementRef;
|
44
|
+
get isLinkButtonDisabled(): boolean;
|
45
|
+
constructor(r: Renderer2, editorService: AngularEditorService, er: ElementRef, doc: any);
|
46
|
+
/**
|
47
|
+
* Trigger command from editor header buttons
|
48
|
+
* @param command string from toolbar buttons
|
49
|
+
*/
|
50
|
+
triggerCommand(command: string): void;
|
51
|
+
/**
|
52
|
+
* highlight editor buttons when cursor moved or positioning
|
53
|
+
*/
|
54
|
+
triggerButtons(): void;
|
55
|
+
/**
|
56
|
+
* trigger highlight editor buttons when cursor moved or positioning in block
|
57
|
+
*/
|
58
|
+
triggerBlocks(nodes: Node[]): void;
|
59
|
+
/**
|
60
|
+
* insert URL link
|
61
|
+
*/
|
62
|
+
insertUrl(): void;
|
63
|
+
/**
|
64
|
+
* insert Video link
|
65
|
+
*/
|
66
|
+
insertVideo(): void;
|
67
|
+
/** insert color */
|
68
|
+
insertColor(color: string, where: string): void;
|
69
|
+
/**
|
70
|
+
* set font Name/family
|
71
|
+
* @param foreColor string
|
72
|
+
*/
|
73
|
+
setFontName(foreColor: string): void;
|
74
|
+
/**
|
75
|
+
* set font Size
|
76
|
+
* @param fontSize string
|
77
|
+
*/
|
78
|
+
setFontSize(fontSize: string): void;
|
79
|
+
/**
|
80
|
+
* toggle editor mode (WYSIWYG or SOURCE)
|
81
|
+
* @param m boolean
|
82
|
+
*/
|
83
|
+
setEditorMode(m: boolean): void;
|
84
|
+
/**
|
85
|
+
* Upload image when file is selected.
|
86
|
+
*/
|
87
|
+
onFileChanged(event: any): void;
|
88
|
+
watchUploadImage(response: HttpResponse<{
|
89
|
+
imageUrl: string;
|
90
|
+
}>, event: any): void;
|
91
|
+
/**
|
92
|
+
* Set custom class
|
93
|
+
*/
|
94
|
+
setCustomClass(classId: string): void;
|
95
|
+
isButtonHidden(name: string): boolean;
|
96
|
+
focus(): void;
|
97
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularEditorToolbarComponent, never>;
|
98
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AngularEditorToolbarComponent, "angular-editor-toolbar", never, { "id": "id"; "uploadUrl": "uploadUrl"; "upload": "upload"; "showToolbar": "showToolbar"; "fonts": "fonts"; "customClasses": "customClasses"; "defaultFontName": "defaultFontName"; "defaultFontSize": "defaultFontSize"; "hiddenButtons": "hiddenButtons"; }, { "execute": "execute"; }, never, never>;
|
99
|
+
}
|
@@ -0,0 +1,127 @@
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, Renderer2 } from '@angular/core';
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
3
|
+
import { AngularEditorConfig } from './config';
|
4
|
+
import { AngularEditorToolbarComponent } from './angular-editor-toolbar.component';
|
5
|
+
import { AngularEditorService } from './angular-editor.service';
|
6
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
7
|
+
import * as i0 from "@angular/core";
|
8
|
+
export declare class AngularEditorComponent implements OnInit, ControlValueAccessor, AfterViewInit, OnDestroy {
|
9
|
+
private r;
|
10
|
+
private editorService;
|
11
|
+
private doc;
|
12
|
+
private sanitizer;
|
13
|
+
private cdRef;
|
14
|
+
private autoFocus;
|
15
|
+
private onChange;
|
16
|
+
private onTouched;
|
17
|
+
modeVisual: boolean;
|
18
|
+
showPlaceholder: boolean;
|
19
|
+
disabled: boolean;
|
20
|
+
focused: boolean;
|
21
|
+
touched: boolean;
|
22
|
+
changed: boolean;
|
23
|
+
focusInstance: any;
|
24
|
+
blurInstance: any;
|
25
|
+
id: string;
|
26
|
+
config: AngularEditorConfig;
|
27
|
+
placeholder: string;
|
28
|
+
tabIndex: number | null;
|
29
|
+
html: any;
|
30
|
+
textArea: ElementRef;
|
31
|
+
editorWrapper: ElementRef;
|
32
|
+
editorToolbar: AngularEditorToolbarComponent;
|
33
|
+
viewMode: EventEmitter<boolean>;
|
34
|
+
/** emits `blur` event when focused out from the textarea */
|
35
|
+
blurEvent: EventEmitter<FocusEvent>;
|
36
|
+
/** emits `focus` event when focused in to the textarea */
|
37
|
+
focusEvent: EventEmitter<FocusEvent>;
|
38
|
+
tabindex: number;
|
39
|
+
onFocus(): void;
|
40
|
+
constructor(r: Renderer2, editorService: AngularEditorService, doc: any, sanitizer: DomSanitizer, cdRef: ChangeDetectorRef, defaultTabIndex: string, autoFocus: any);
|
41
|
+
ngOnInit(): void;
|
42
|
+
ngAfterViewInit(): void;
|
43
|
+
onPaste(event: ClipboardEvent): string;
|
44
|
+
/**
|
45
|
+
* Executed command from editor header buttons
|
46
|
+
* @param command string from triggerCommand
|
47
|
+
*/
|
48
|
+
executeCommand(command: string): void;
|
49
|
+
/**
|
50
|
+
* focus event
|
51
|
+
*/
|
52
|
+
onTextAreaFocus(event: FocusEvent): void;
|
53
|
+
/**
|
54
|
+
* @description fires when cursor leaves textarea
|
55
|
+
*/
|
56
|
+
onTextAreaMouseOut(event: MouseEvent): void;
|
57
|
+
/**
|
58
|
+
* blur event
|
59
|
+
*/
|
60
|
+
onTextAreaBlur(event: FocusEvent): void;
|
61
|
+
/**
|
62
|
+
* focus the text area when the editor is focused
|
63
|
+
*/
|
64
|
+
focus(): void;
|
65
|
+
/**
|
66
|
+
* Executed from the contenteditable section while the input property changes
|
67
|
+
* @param element html element from contenteditable
|
68
|
+
*/
|
69
|
+
onContentChange(element: HTMLElement): void;
|
70
|
+
/**
|
71
|
+
* Set the function to be called
|
72
|
+
* when the control receives a change event.
|
73
|
+
*
|
74
|
+
* @param fn a function
|
75
|
+
*/
|
76
|
+
registerOnChange(fn: any): void;
|
77
|
+
/**
|
78
|
+
* Set the function to be called
|
79
|
+
* when the control receives a touch event.
|
80
|
+
*
|
81
|
+
* @param fn a function
|
82
|
+
*/
|
83
|
+
registerOnTouched(fn: any): void;
|
84
|
+
/**
|
85
|
+
* Write a new value to the element.
|
86
|
+
*
|
87
|
+
* @param value value to be executed when there is a change in contenteditable
|
88
|
+
*/
|
89
|
+
writeValue(value: any): void;
|
90
|
+
/**
|
91
|
+
* refresh view/HTML of the editor
|
92
|
+
*
|
93
|
+
* @param value html string from the editor
|
94
|
+
*/
|
95
|
+
refreshView(value: string): void;
|
96
|
+
/**
|
97
|
+
* toggles placeholder based on input string
|
98
|
+
*
|
99
|
+
* @param value A HTML string from the editor
|
100
|
+
*/
|
101
|
+
togglePlaceholder(value: boolean): void;
|
102
|
+
/**
|
103
|
+
* Implements disabled state for this element
|
104
|
+
*
|
105
|
+
* @param isDisabled Disabled flag
|
106
|
+
*/
|
107
|
+
setDisabledState(isDisabled: boolean): void;
|
108
|
+
/**
|
109
|
+
* toggles editor mode based on bToSource bool
|
110
|
+
*
|
111
|
+
* @param bToSource A boolean value from the editor
|
112
|
+
*/
|
113
|
+
toggleEditorMode(bToSource: boolean): void;
|
114
|
+
/**
|
115
|
+
* toggles editor buttons when cursor moved or positioning
|
116
|
+
*
|
117
|
+
* Send a node array from the contentEditable of the editor
|
118
|
+
*/
|
119
|
+
exec(): void;
|
120
|
+
private configure;
|
121
|
+
getFonts(): import("./config").Font[];
|
122
|
+
getCustomTags(): string;
|
123
|
+
ngOnDestroy(): void;
|
124
|
+
filterStyles(html: string): string;
|
125
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularEditorComponent, [null, null, null, null, null, { attribute: "tabindex"; }, { attribute: "autofocus"; }]>;
|
126
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AngularEditorComponent, "angular-editor", never, { "id": "id"; "config": "config"; "placeholder": "placeholder"; "tabIndex": "tabIndex"; }, { "html": "html"; "viewMode": "viewMode"; "blurEvent": "blur"; "focusEvent": "focus"; }, never, never>;
|
127
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "./angular-editor.component";
|
3
|
+
import * as i2 from "./angular-editor-toolbar.component";
|
4
|
+
import * as i3 from "./ae-select/ae-select.component";
|
5
|
+
import * as i4 from "@angular/common";
|
6
|
+
import * as i5 from "@angular/forms";
|
7
|
+
export declare class AngularEditorModule {
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularEditorModule, never>;
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AngularEditorModule, [typeof i1.AngularEditorComponent, typeof i2.AngularEditorToolbarComponent, typeof i3.AeSelectComponent], [typeof i4.CommonModule, typeof i5.FormsModule, typeof i5.ReactiveFormsModule], [typeof i1.AngularEditorComponent, typeof i2.AngularEditorToolbarComponent]>;
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AngularEditorModule>;
|
11
|
+
}
|
@@ -0,0 +1,86 @@
|
|
1
|
+
import { HttpClient, HttpEvent } from '@angular/common/http';
|
2
|
+
import { Observable } from 'rxjs';
|
3
|
+
import { CustomClass } from './config';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export interface UploadResponse {
|
6
|
+
imageUrl: string;
|
7
|
+
}
|
8
|
+
export declare class AngularEditorService {
|
9
|
+
private http;
|
10
|
+
private doc;
|
11
|
+
savedSelection: Range | null;
|
12
|
+
selectedText: string;
|
13
|
+
uploadUrl: string;
|
14
|
+
uploadWithCredentials: boolean;
|
15
|
+
constructor(http: HttpClient, doc: any);
|
16
|
+
/**
|
17
|
+
* Executed command from editor header buttons exclude toggleEditorMode
|
18
|
+
* @param command string from triggerCommand
|
19
|
+
*/
|
20
|
+
executeCommand(command: string): void;
|
21
|
+
/**
|
22
|
+
* Create URL link
|
23
|
+
* @param url string from UI prompt
|
24
|
+
*/
|
25
|
+
createLink(url: string): void;
|
26
|
+
/**
|
27
|
+
* insert color either font or background
|
28
|
+
*
|
29
|
+
* @param color color to be inserted
|
30
|
+
* @param where where the color has to be inserted either text/background
|
31
|
+
*/
|
32
|
+
insertColor(color: string, where: string): void;
|
33
|
+
/**
|
34
|
+
* Set font name
|
35
|
+
* @param fontName string
|
36
|
+
*/
|
37
|
+
setFontName(fontName: string): void;
|
38
|
+
/**
|
39
|
+
* Set font size
|
40
|
+
* @param fontSize string
|
41
|
+
*/
|
42
|
+
setFontSize(fontSize: string): void;
|
43
|
+
/**
|
44
|
+
* Create raw HTML
|
45
|
+
* @param html HTML string
|
46
|
+
*/
|
47
|
+
insertHtml(html: string): void;
|
48
|
+
/**
|
49
|
+
* save selection when the editor is focussed out
|
50
|
+
*/
|
51
|
+
saveSelection: () => void;
|
52
|
+
/**
|
53
|
+
* restore selection when the editor is focused in
|
54
|
+
*
|
55
|
+
* saved selection when the editor is focused out
|
56
|
+
*/
|
57
|
+
restoreSelection(): boolean;
|
58
|
+
/**
|
59
|
+
* setTimeout used for execute 'saveSelection' method in next event loop iteration
|
60
|
+
*/
|
61
|
+
executeInNextQueueIteration(callbackFn: (...args: any[]) => any, timeout?: number): void;
|
62
|
+
/** check any selection is made or not */
|
63
|
+
private checkSelection;
|
64
|
+
/**
|
65
|
+
* Upload file to uploadUrl
|
66
|
+
* @param file The file
|
67
|
+
*/
|
68
|
+
uploadImage(file: File): Observable<HttpEvent<UploadResponse>>;
|
69
|
+
/**
|
70
|
+
* Insert image with Url
|
71
|
+
* @param imageUrl The imageUrl.
|
72
|
+
*/
|
73
|
+
insertImage(imageUrl: string): void;
|
74
|
+
setDefaultParagraphSeparator(separator: string): void;
|
75
|
+
createCustomClass(customClass: CustomClass): void;
|
76
|
+
insertVideo(videoUrl: string): void;
|
77
|
+
private insertYouTubeVideoTag;
|
78
|
+
private insertVimeoVideoTag;
|
79
|
+
nextNode(node: any): any;
|
80
|
+
getRangeSelectedNodes(range: any, includePartiallySelectedContainers: any): any[];
|
81
|
+
getSelectedNodes(): any[];
|
82
|
+
replaceWithOwnChildren(el: any): void;
|
83
|
+
removeSelectedElements(tagNames: any): void;
|
84
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularEditorService, never>;
|
85
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AngularEditorService>;
|
86
|
+
}
|
package/lib/config.d.ts
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
import { UploadResponse } from './angular-editor.service';
|
2
|
+
import { HttpEvent } from '@angular/common/http';
|
3
|
+
import { Observable } from 'rxjs';
|
4
|
+
export interface CustomClass {
|
5
|
+
name: string;
|
6
|
+
class: string;
|
7
|
+
tag?: string;
|
8
|
+
}
|
9
|
+
export interface Font {
|
10
|
+
name: string;
|
11
|
+
class: string;
|
12
|
+
}
|
13
|
+
export interface AngularEditorConfig {
|
14
|
+
editable?: boolean;
|
15
|
+
spellcheck?: boolean;
|
16
|
+
height?: 'auto' | string;
|
17
|
+
minHeight?: '0' | string;
|
18
|
+
maxHeight?: 'auto' | string;
|
19
|
+
width?: 'auto' | string;
|
20
|
+
minWidth?: '0' | string;
|
21
|
+
translate?: 'yes' | 'now' | string;
|
22
|
+
enableToolbar?: boolean;
|
23
|
+
showToolbar?: boolean;
|
24
|
+
placeholder?: string;
|
25
|
+
defaultParagraphSeparator?: string;
|
26
|
+
defaultFontName?: string;
|
27
|
+
defaultFontSize?: '1' | '2' | '3' | '4' | '5' | '6' | '7' | string;
|
28
|
+
uploadUrl?: string;
|
29
|
+
upload?: (file: File) => Observable<HttpEvent<UploadResponse>>;
|
30
|
+
uploadWithCredentials?: boolean;
|
31
|
+
fonts?: Font[];
|
32
|
+
customClasses?: CustomClass[];
|
33
|
+
sanitize?: boolean;
|
34
|
+
toolbarPosition?: 'top' | 'bottom';
|
35
|
+
outline?: boolean;
|
36
|
+
toolbarHiddenButtons?: string[][];
|
37
|
+
rawPaste?: boolean;
|
38
|
+
}
|
39
|
+
export declare const angularEditorConfig: AngularEditorConfig;
|
package/lib/utils.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export declare function isDefined(value: any): boolean;
|