@flozy/editor 1.2.4 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -50,6 +50,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
50
50
  const [loadedValue] = useState(value);
51
51
  const [isInteracted, setIsInteracted] = useState(false);
52
52
  const [deboundedValue] = useDebounce(value, 500);
53
+ const [fullScreen, setFullScreen] = useState(false);
53
54
  const editor = useMemo(() => {
54
55
  if (collaborativeEditor) return collaborativeEditor;
55
56
  return withCommon(createEditor());
@@ -122,6 +123,9 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
122
123
  },
123
124
  insertFragments(fragments) {
124
125
  editor.insertNode(fragments);
126
+ },
127
+ toggleFullscreen() {
128
+ setFullScreen(!fullScreen);
125
129
  }
126
130
  }));
127
131
  const [htmlAction, setHtmlAction] = useState({
@@ -190,6 +194,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
190
194
  const Overlay = collaborativeEditor && !isReadOnly ? RemoteCursorOverlay : React.Fragment;
191
195
  return /*#__PURE__*/_jsx(DialogWrapper, {
192
196
  ...props,
197
+ fullScreen: fullScreen,
193
198
  children: /*#__PURE__*/_jsx("div", {
194
199
  style: {
195
200
  display: "flex",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"