@syncfusion/ej2-richtexteditor
Advanced tools
Comparing version 28.2.6 to 28.2.7
/*! | ||
* filename: index.d.ts | ||
* version : 28.2.6 | ||
* version : 28.2.7 | ||
* Copyright Syncfusion Inc. 2001 - 2024. All rights reserved. | ||
@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license. |
{ | ||
"_from": "@syncfusion/ej2-richtexteditor@*", | ||
"_id": "@syncfusion/ej2-richtexteditor@28.2.5", | ||
"_id": "@syncfusion/ej2-richtexteditor@28.2.6", | ||
"_inBundle": false, | ||
"_integrity": "sha512-Qm/hUUM62jaXu1qA2wd+eQHI7I0tO/hP456cVvguxH5RhPqy8HEEpIboJdJmzDSoZwZ37W/P1lH2zWROsLBXAg==", | ||
"_integrity": "sha512-0RVKG1iRO0PvlAqNALVkyYU+71zPjs4MrhPPE0nmS9wazelcDGhrH3L53OgFn6jcX4o1IhY4hQuYGe5rTXpMMA==", | ||
"_location": "/@syncfusion/ej2-richtexteditor", | ||
@@ -28,4 +28,4 @@ "_phantomChildren": {}, | ||
], | ||
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-28.2.5.tgz", | ||
"_shasum": "c3310aca2a0fd1f9810bd2c1056fe5845d716d51", | ||
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-28.2.6.tgz", | ||
"_shasum": "ba9d85518b6c3668b2bfd814fdd8d898ec8d0c4e", | ||
"_spec": "@syncfusion/ej2-richtexteditor@*", | ||
@@ -42,4 +42,4 @@ "_where": "/jenkins/workspace/elease-automation_release_28.1.1/packages/included", | ||
"@syncfusion/ej2-base": "~28.2.5", | ||
"@syncfusion/ej2-buttons": "~28.2.6", | ||
"@syncfusion/ej2-dropdowns": "~28.2.6", | ||
"@syncfusion/ej2-buttons": "~28.2.7", | ||
"@syncfusion/ej2-dropdowns": "~28.2.7", | ||
"@syncfusion/ej2-filemanager": "~28.2.6", | ||
@@ -85,4 +85,4 @@ "@syncfusion/ej2-inputs": "~28.2.3", | ||
"typings": "index.d.ts", | ||
"version": "28.2.6", | ||
"version": "28.2.7", | ||
"sideEffects": false | ||
} |
@@ -496,3 +496,3 @@ import * as CONSTANT from './../base/constant'; | ||
var startChildNodes = range.startContainer.childNodes; | ||
var isTableStart = startChildNodes.length > 1 && startChildNodes[0].nodeName === 'TABLE'; | ||
var isTableStart = startChildNodes.length > 1 && startChildNodes[0].nodeName === 'TABLE' && range.startOffset === 0; | ||
var isImgOnlySelected = startChildNodes.length > 1 && startChildNodes[0].nodeName === 'IMAGE' && | ||
@@ -499,0 +499,0 @@ range.endOffset === 1 && range.endContainer.nodeName === '#text' && range.endContainer.textContent.length === 0; |
@@ -99,3 +99,12 @@ import { NodeSelection } from './../../selection/index'; | ||
if (insertNode.tagName === 'TABLE') { | ||
this.removeEmptyElements(editNode); | ||
var emptyElement = closest(range.startContainer, 'blockquote'); | ||
if (!isNOU(emptyElement) && emptyElement.childNodes.length > 0) { | ||
for (var i = emptyElement.childNodes.length - 1; i >= 0; i--) { | ||
var currentChild = emptyElement.childNodes[i]; | ||
if (!isNOU(currentChild) && currentChild.innerText.trim() === '') { | ||
detach(currentChild); | ||
} | ||
} | ||
} | ||
this.removeEmptyElements(editNode, false, emptyElement); | ||
} | ||
@@ -521,3 +530,3 @@ for (var index = 0; index < nodes.length; index++) { | ||
elements.forEach(function (child) { return newListItem.appendChild(child); }); | ||
if (newListItem.textContent && newListItem.textContent.trim() === '') { | ||
if (newListItem.textContent && newListItem.textContent.trim() === '' && !newListItem.querySelector('img')) { | ||
parentList.removeChild(newListItem); | ||
@@ -726,4 +735,5 @@ } | ||
}; | ||
InsertHtml.removeEmptyElements = function (element, ignoreBlockNodes) { | ||
InsertHtml.removeEmptyElements = function (element, ignoreBlockNodes, emptyElement) { | ||
if (ignoreBlockNodes === void 0) { ignoreBlockNodes = false; } | ||
if (emptyElement === void 0) { emptyElement = null; } | ||
var emptyElements = element.querySelectorAll(':empty'); | ||
@@ -748,3 +758,4 @@ var filteredEmptyElements = Array.from(emptyElements).filter(function (element) { | ||
} | ||
if (CONSTANT.SELF_CLOSING_TAGS.indexOf(currentEmptyElem.tagName.toLowerCase()) < 0 && lineWithDiv) { | ||
var isEmptyElement = !isNOU(emptyElement) && currentEmptyElem === emptyElement; | ||
if (CONSTANT.SELF_CLOSING_TAGS.indexOf(currentEmptyElem.tagName.toLowerCase()) < 0 && lineWithDiv && !isEmptyElement) { | ||
var detachableElement = this.findDetachEmptyElem(currentEmptyElem, ignoreBlockNodes); | ||
@@ -751,0 +762,0 @@ if (!isNOU(detachableElement) && !(detachableElement.nodeType === Node.ELEMENT_NODE && detachableElement.nodeName.toUpperCase() === 'TEXTAREA')) { |
@@ -30,4 +30,6 @@ import { EditorManager } from './../base/editor-manager'; | ||
private createAutoList; | ||
private isInsideSameListType; | ||
private spaceList; | ||
private enterList; | ||
private handleNestedEnterKeyForLists; | ||
private backspaceList; | ||
@@ -47,2 +49,5 @@ private removeList; | ||
private nestedList; | ||
private isCursorBeforeTable; | ||
private isCursorAtEndOfTable; | ||
private isListItemWithTableChild; | ||
private applyListsHandler; | ||
@@ -49,0 +54,0 @@ private setSelectionBRConfig; |
@@ -187,2 +187,3 @@ import * as EVENTS from '../../common/constant'; | ||
imgElem[i].getAttribute('v:shapes').indexOf('Picture') < 0 && | ||
imgElem[i].getAttribute('v:shapes').indexOf('Chart') < 0 && | ||
imgElem[i].getAttribute('v:shapes').indexOf('圖片') < 0 && | ||
@@ -208,5 +209,7 @@ imgElem[i].getAttribute('v:shapes').indexOf('Grafik') < 0 && | ||
for (var i = 0; i < imgElem.length; i++) { | ||
imgSrc.push(imgElem[i].getAttribute('src')); | ||
var imageName = imgElem[i].getAttribute('src').split('/')[imgElem[i].getAttribute('src').split('/').length - 1].split('.')[0] + i; | ||
imgName.push(imageName); | ||
if (!imgElem[i].classList.contains('e-rte-image-unsupported')) { | ||
imgSrc.push(imgElem[i].getAttribute('src')); | ||
var imageName = imgElem[i].getAttribute('src').split('/')[imgElem[i].getAttribute('src').split('/').length - 1].split('.')[0] + i; | ||
imgName.push(imageName); | ||
} | ||
} | ||
@@ -213,0 +216,0 @@ var hexValue = this.hexConversion(rtfData); |
@@ -331,3 +331,3 @@ import { detach, getUniqueID, append, closest, selectAll, select, isNullOrUndefined as isNOU } from '@syncfusion/ej2-base'; | ||
} | ||
if (!_this.parent.inlineMode.enable) { | ||
if (!_this.parent.inlineMode.enable || _this.parent.iframeSettings.enable) { | ||
_this.checkCollision(showPopupData, 'parent', ''); | ||
@@ -334,0 +334,0 @@ } |
@@ -58,2 +58,3 @@ import { IRichTextEditor } from '../base/interface'; | ||
private findLastTextPosition; | ||
private getImmediateBlockNode; | ||
private deleteCleanup; | ||
@@ -60,0 +61,0 @@ private getCaretIndex; |
@@ -194,24 +194,2 @@ import * as events from '../base/constant'; | ||
!isNOU(tempDivElem.querySelector('table')); | ||
var imgElements = tempDivElem.querySelectorAll('img'); | ||
var base_1 = this.parent.contentModule.getDocument().baseURI; | ||
imgElements.forEach(function (imgElement) { | ||
var imageFileFormat; | ||
var imgElementSrc = imgElement.getAttribute('src'); | ||
if (!isNullOrUndefined(imgElementSrc) && imgElementSrc !== '') { | ||
if (imgElementSrc.indexOf('base64') > -1 && imgElementSrc.indexOf('data:') > -1) { | ||
imageFileFormat = imgElementSrc.split(';')[0].split('/')[1]; | ||
} | ||
else { | ||
var parsedUrl = imgElementSrc.indexOf('http') > -1 ? new URL(imgElementSrc) : new URL(imgElementSrc, base_1); | ||
var path = parsedUrl.pathname; | ||
imageFileFormat = path.split('.').pop().toLowerCase(); | ||
} | ||
if (!isNullOrUndefined(imageFileFormat) && | ||
allowedTypes.every(function (type) { return imageFileFormat !== type.substring(1).toLowerCase(); }) && | ||
imgElementSrc.indexOf('blob') === -1) { | ||
detach(imgElement); | ||
} | ||
} | ||
}); | ||
value = tempDivElem.innerHTML; | ||
this.parent.notify(events.cleanupResizeElements, { | ||
@@ -218,0 +196,0 @@ value: value, |
@@ -9,3 +9,3 @@ import { addClass, detach, EventHandler, isNullOrUndefined, Ajax } from '@syncfusion/ej2-base'; | ||
import { dispatchEvent, hasClass, convertToBlob } from '../base/util'; | ||
import { isIDevice } from '../../common/util'; | ||
import { isIDevice, isSafari } from '../../common/util'; | ||
/** | ||
@@ -373,3 +373,3 @@ * `Audio` module is used to handle audio actions. | ||
} | ||
if (this.isAudioElem(e.target)) { | ||
if (this.isAudioElem(e.target) && !isSafari()) { | ||
this.audEle = e.target.querySelector('audio'); | ||
@@ -376,0 +376,0 @@ e.preventDefault(); |
@@ -151,2 +151,3 @@ import { Uploader } from '@syncfusion/ej2-inputs'; | ||
private insertDragImage; | ||
private hasOnlyImage; | ||
private onSelect; | ||
@@ -153,0 +154,0 @@ /** |
@@ -152,2 +152,3 @@ import { Mention } from '@syncfusion/ej2-dropdowns'; | ||
} | ||
_this.parent.notify(events.toolbarRefresh, {}); | ||
} | ||
@@ -154,0 +155,0 @@ else { |
@@ -13,2 +13,3 @@ import { addClass, Browser, removeClass, formatUnit, isNullOrUndefined, isNullOrUndefined as isNOU, EventHandler, detach } from '@syncfusion/ej2-base'; | ||
import { isSafari } from '../../common/util'; | ||
import { defaultLocale } from '../models/default-locale'; | ||
/** | ||
@@ -443,10 +444,7 @@ * `Toolbar renderer` module is used to render toolbar in RichTextEditor. | ||
var currentLiElem = !isNOU(listElem) ? listElem.parentElement : null; | ||
if (!isNOU(currentLiElem) && (currentLiElem.nodeName === 'OL' || currentLiElem.nodeName === 'UL')) { | ||
if (currentLiElem.nodeName === 'UL' && args.items[0].subCommand === 'NumberFormatList') { | ||
addClass([args.element.childNodes[0]], 'e-active'); | ||
} | ||
else if (currentLiElem.nodeName === 'OL' && args.items[0].subCommand === 'BulletFormatList') { | ||
addClass([args.element.childNodes[0]], 'e-active'); | ||
} | ||
else { | ||
var currentAction = args.items[0].subCommand; | ||
if (!isNOU(currentLiElem)) { | ||
var validNumberFormatAction = (currentAction === 'NumberFormatList' && currentLiElem.nodeName === 'OL'); | ||
var validBulletFormatAction = (currentAction === 'BulletFormatList' && currentLiElem.nodeName === 'UL'); | ||
if (validNumberFormatAction || validBulletFormatAction) { | ||
var currentListStyle = currentLiElem.style.listStyleType.split('-').join('').toLocaleLowerCase(); | ||
@@ -466,5 +464,2 @@ currentListStyle = currentListStyle === 'decimal' ? 'number' : currentListStyle; | ||
} | ||
else { | ||
addClass([args.element.childNodes[0]], 'e-active'); | ||
} | ||
} | ||
@@ -648,2 +643,3 @@ _this.closeTooltip({ target: args.event.target }); | ||
dropDown.appendTo(args.element); | ||
args.element.setAttribute('aria-label', item === 'backgroundcolor' ? defaultLocale.backgroundColor : defaultLocale.fontColor); | ||
var popupElement = document.getElementById(dropDown.element.id + '-popup'); | ||
@@ -650,0 +646,0 @@ popupElement.setAttribute('aria-owns', this.parent.getID()); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
38205676
377122