feat(wysiwyg): implement backspace
This commit is contained in:
@ -506,7 +506,7 @@ export class DeesWysiwygBlock extends DeesElement {
|
||||
/**
|
||||
* Get cursor position in the editable element
|
||||
*/
|
||||
private getCursorPosition(element: HTMLElement): number | null {
|
||||
public getCursorPosition(element: HTMLElement): number | null {
|
||||
// Get parent wysiwyg component's shadow root
|
||||
const parentComponent = this.closest('dees-input-wysiwyg');
|
||||
const parentShadowRoot = parentComponent?.shadowRoot;
|
||||
@ -765,8 +765,10 @@ export class DeesWysiwygBlock extends DeesElement {
|
||||
cursorPos,
|
||||
beforeHtml,
|
||||
beforeLength: beforeHtml.length,
|
||||
beforeHtmlPreview: beforeHtml.substring(0, 100) + (beforeHtml.length > 100 ? '...' : ''),
|
||||
afterHtml,
|
||||
afterLength: afterHtml.length
|
||||
afterLength: afterHtml.length,
|
||||
afterHtmlPreview: afterHtml.substring(0, 100) + (afterHtml.length > 100 ? '...' : '')
|
||||
});
|
||||
|
||||
return {
|
||||
|
Reference in New Issue
Block a user