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

fix(*): fix cherry overflow & fix customHook could config params on t… #61

Merged
merged 1 commit into from
Dec 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/core/HookCenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export default class HookCenter {
register(HookClass, editorConfig, customHookConfig) {
// filter Configs Here
const { externals, engine } = editorConfig;
const { syntax } = engine;
const { syntax, customSyntax } = engine;
let instance;
let hookName;
// 首先校验Hook是否合法
Expand All @@ -164,7 +164,7 @@ export default class HookCenter {
}
} else {
hookName = /** @type {typeof SyntaxBase}*/ (HookClass).HOOK_NAME;
const config = syntax[hookName] ? syntax[hookName] : {};
const config = syntax[hookName] ? syntax[hookName] : customSyntax[hookName] ? customSyntax[hookName] : {};
instance = new /** @type {typeof SyntaxBase}*/ (HookClass)({ externals, config, globalConfig: engine.global });
}
// Skip Internal Hook
Expand Down
2 changes: 1 addition & 1 deletion src/sass/cherry.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
height: 100%;
min-height: 400px;
position: relative;
overflow: hidden;
// overflow: hidden;

.cherry-editor,
.cherry-previewer {
Expand Down