|
@@ -106,6 +106,11 @@ const EditorComp = defineComponent({
|
|
|
out.in = true;
|
|
|
return out;
|
|
|
}
|
|
|
+ const ckBodyWrapper = document.querySelector(".ck-body-wrapper");
|
|
|
+ if (ckBodyWrapper === dom || ckBodyWrapper?.contains(dom)) {
|
|
|
+ out.in = true;
|
|
|
+ return out;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
let n = 0;
|
|
@@ -113,12 +118,12 @@ const EditorComp = defineComponent({
|
|
|
do {
|
|
|
if (
|
|
|
curr.id == "toptoolbar" ||
|
|
|
- curr.class.contains(".pcr-app") ||
|
|
|
- curr.class.contains(".editor_toolbar_drop") ||
|
|
|
- curr.class.contains(".ant-select-dropdown") ||
|
|
|
- curr.class.contains(".ck-body-wrapper")
|
|
|
+ curr.classList.contains("pcr-app") ||
|
|
|
+ curr.classList.contains("editor_toolbar_drop") ||
|
|
|
+ curr.classList.contains("ant-select-dropdown")
|
|
|
) {
|
|
|
out.in = true;
|
|
|
+ out.stop = false;
|
|
|
return out;
|
|
|
}
|
|
|
curr = curr.parentElement;
|
|
@@ -207,50 +212,6 @@ const EditorComp = defineComponent({
|
|
|
return () => {
|
|
|
return <div class={textStyle} id={`editor_${props.compId}`}></div>;
|
|
|
};
|
|
|
-
|
|
|
- // return () => (
|
|
|
-
|
|
|
- // <ckeditor
|
|
|
- // class={textStyle}
|
|
|
- // ref={inputRef}
|
|
|
- // editor={InlineEditor}
|
|
|
- // onInput={(value: any) => {
|
|
|
- // if (editorInstance.value && comp.value !== value) {
|
|
|
- // actions.updateCompData(comp, "value", value);
|
|
|
- // nextTick(() => {
|
|
|
- // const h = helper.pxToDesignSize(inputRef.value?.$el.clientHeight);
|
|
|
- // const isChange = Math.abs(preHeight.value - h) > 1;
|
|
|
- // preHeight.value = h;
|
|
|
- // actions.updateCompDatas(
|
|
|
- // comp,
|
|
|
- // ["value", "layout.size.1"],
|
|
|
- // [value, preHeight.value]
|
|
|
- // );
|
|
|
- // helper.extendStreamCard(store.currStreamCardId);
|
|
|
- // if (isChange) {
|
|
|
- // console.log("changing=>", isChange);
|
|
|
- // actions.selectObjs([]);
|
|
|
- // setTimeout(() => {
|
|
|
- // actions.selectObjs([props.compId]);
|
|
|
- // }, 0);
|
|
|
- // }
|
|
|
- // });
|
|
|
- // }
|
|
|
- // }}
|
|
|
- // onReady={(editor: InlineEditor) => {
|
|
|
- // editorInstance.value = editor;
|
|
|
- // console.log("editor");
|
|
|
- // editor.setData(comp.value);
|
|
|
- // editor.focus();
|
|
|
- // const range = document.createRange();
|
|
|
- // range.selectNodeContents(inputRef.value.$el);
|
|
|
- // const selection = window.getSelection();
|
|
|
- // selection?.removeAllRanges();
|
|
|
- // selection?.addRange(range);
|
|
|
- // }}
|
|
|
- // config={GetConfig()}
|
|
|
- // />
|
|
|
- // );
|
|
|
},
|
|
|
});
|
|
|
|
|
@@ -259,15 +220,7 @@ const textStyle = css`
|
|
|
width: 100%;
|
|
|
color: #666;
|
|
|
word-break: break-all;
|
|
|
- h2 {
|
|
|
- color: #111;
|
|
|
- font-size: 24px;
|
|
|
- font-weight: 600;
|
|
|
- }
|
|
|
- h3 {
|
|
|
- font-size: 18px;
|
|
|
- color: #333;
|
|
|
- }
|
|
|
+
|
|
|
p {
|
|
|
margin: 0;
|
|
|
}
|