@lazlon-platform/html-editor 0.3.1 → 0.3.2

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.
@@ -22,11 +22,12 @@ export function EditableContent(props: {
22
22
  const prevContent = useRef(node.tiptap.getJSON())
23
23
 
24
24
  // start with selection.has(node) so that newly added editable nodes can be focused
25
- const [clicked, setClicked] = useState(selection.has(node))
25
+ const [clicked, setClicked] = useState(() => selection.has(node))
26
26
 
27
27
  const onDoubleClick = useDoubleClick(
28
28
  useCallback(() => {
29
29
  setClicked(true)
30
+ console.log("hello")
30
31
  node.tiptap.commands.focus()
31
32
  }, [node, setClicked]),
32
33
  )
@@ -77,7 +78,7 @@ export function EditableContent(props: {
77
78
  return (
78
79
  <div
79
80
  ref={(ref) => void (node.contentRef = ref)}
80
- className={clsx("relative min-w-[min(80%,6ch)]", className)}
81
+ className={clsx("relative min-w-[min(80%,6ch)] min-h-3", className)}
81
82
  onPointerDown={onDoubleClick}
82
83
  style={{ ...style, ...(!isEmpty && { lineHeight }) }}
83
84
  >
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazlon-platform/html-editor",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "lib"