Skip to content

Commit

Permalink
Merge pull request #496 from VictoriaShyika/273-convert-to-node-paste…
Browse files Browse the repository at this point in the history
…d-html

494: Converting to node pasted html
  • Loading branch information
atulbhatt-system32 authored Dec 11, 2023
2 parents 035e251 + 71539e3 commit e856617
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/main/stageView/iFrame/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { ShortDelay } from "@_constants/main";
import {
StageNodeIdAttr,
TNodeTreeData,
TNodeUid,
callNodeApi,
} from "@_node/index";
import { debounce } from "lodash";
import { editor } from "monaco-editor";

export const getValidElementWithUid = (
Expand Down Expand Up @@ -114,14 +112,15 @@ export const editHtmlContent = ({
);
if (contentEditableElement) {
contentEditableElement.setAttribute("contenteditable", "false");
const content = contentEditableElement.textContent;

setIsContentProgrammaticallyChanged(true);
callNodeApi(
{
action: "text-edit",
nodeTree,
targetUid: contentEditableUid,
content: contentEditableElement.innerHTML,
content: content ? content : "",
codeViewInstanceModel,
},
() => {
Expand Down

0 comments on commit e856617

Please sign in to comment.