Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(docs-ui): refactor to RenderUnit #2539

Open
wants to merge 22 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: update code style
  • Loading branch information
wzhudev committed Jun 18, 2024
commit eb2b0c5d28381cf4098ebe39dc5d1381018a4119
10 changes: 6 additions & 4 deletions packages/core/src/common/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@
* limitations under the License.
*/

export const DOCS_NORMAL_EDITOR_UNIT_ID_KEY = '__INTERNAL_EDITOR__DOCS_NORMAL';
const PREFIX = '__INTERNAL_EDITOR__';

export const DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY = '__INTERNAL_EDITOR__DOCS_FORMULA_BAR';
export const DOCS_NORMAL_EDITOR_UNIT_ID_KEY = `${PREFIX}DOCS_NORMAL`;

export const DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY = `${PREFIX}DOCS_FORMULA_BAR`;

export const DEFAULT_EMPTY_DOCUMENT_VALUE = '\r\n';

export function createInternalEditorID(id: string) {
return `__INTERNAL_EDITOR__${id}`;
return `${PREFIX}${id}`;
}

export function isInternalEditorID(id: string) {
return id.startsWith('__INTERNAL_EDITOR__');
return id.startsWith(PREFIX);
}