Skip to content

Commit

Permalink
merge origin/main into v15/feature/tiptap
Browse files Browse the repository at this point in the history
  • Loading branch information
iOvergaard committed Sep 30, 2024
1 parent 4974147 commit 6dbbe0b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/packages/block/block/context/block-entries.context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export abstract class UmbBlockEntriesContext<
layoutEntry: BlockLayoutType,
content: UmbBlockDataModel,
settings: UmbBlockDataModel | undefined,
originData: UmbBlockWorkspaceOriginData,
originData: BlockOriginData,
): Promise<boolean>;
//edit?
//editSettings
Expand Down
15 changes: 8 additions & 7 deletions src/packages/rte/components/rte-base.element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ export abstract class UmbRteBaseElement extends UmbLitElement implements UmbProp
this.#managerContext.setEditorConfiguration(config);
}

/**
* Sets the input to readonly mode, meaning value cannot be changed but still able to read and select its content.
* @default false
*/
@property({ type: Boolean, reflect: true })
readonly = false;

@property({
attribute: false,
type: Object,
Expand All @@ -45,6 +38,7 @@ export abstract class UmbRteBaseElement extends UmbLitElement implements UmbProp
const buildUpValue: Partial<UmbPropertyEditorUiValueType> = value ? { ...value } : {};
buildUpValue.markup ??= '';
buildUpValue.blocks ??= { layout: {}, contentData: [], settingsData: [], expose: [] };
buildUpValue.blocks.layout ??= {};
buildUpValue.blocks.contentData ??= [];
buildUpValue.blocks.settingsData ??= [];
buildUpValue.blocks.expose ??= [];
Expand All @@ -64,6 +58,13 @@ export abstract class UmbRteBaseElement extends UmbLitElement implements UmbProp
return this._value;
}

/**
* Sets the input to readonly mode, meaning value cannot be changed but still able to read and select its content.
* @default false
*/
@property({ type: Boolean, reflect: true })
readonly = false;

@state()
protected _config?: UmbPropertyEditorConfigCollection;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default class UmbTinyMceMultiUrlPickerPlugin extends UmbTinyMcePluginBase

const blockEl = `<${blockTag} ${UMB_BLOCK_RTE_DATA_CONTENT_KEY}="${block.key}"></${blockTag}>`;

editor.insertContent(blockEl);
editor.selection.setContent(blockEl);
});
}
}

0 comments on commit 6dbbe0b

Please sign in to comment.