Skip to content
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: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ As you can see to test you can repeat steps 1-3 as many times as you want.
- Lint your code with `npm run lint`.
- Format your code with `npm run format`.
- Update the CHANGELOG.md to reflect the changes you made, we follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
- Add your entry under `## [Unreleased]`, in the `### Added` / `### Changed` / `### Fixed` section that matches your change (create the section if it isn't there yet).
- Format: `- [#ISSUE_ID](https://github.com/InditexTech/weavejs/issues/ISSUE_ID) ISSUE_NAME`, where `ISSUE_NAME` is the **verbatim title of the GitHub issue** (drop a generic prefix like `Feature request:`/`Bug:` if the issue has one, but otherwise don't paraphrase or summarize it).
- Example: `- [#1158](https://github.com/InditexTech/weavejs/issues/1158) Opt-in "fully enclosed" (contains) mode for drag-selection`

- On the PR, depending on your change add one of the following labels:

- `skip-release`: when this PR is merged no release will be performed.
Expand Down
4 changes: 4 additions & 0 deletions code/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- [#1167](https://github.com/InditexTech/weavejs/issues/1167) Support hyperlinks on text nodes: make the whole text clickable to a defined URL

## [5.3.0] - 2026-09-07

### Added
Expand Down
1 change: 1 addition & 0 deletions code/packages/sdk/src/nodes/extensions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ declare module 'konva/lib/Node' {
closeCrop(type: WeaveImageCropEndType): void;
resetCrop(): void;
dblClick(): void;
click(payload: { wasSelected: boolean; ctrlOrMetaPressed: boolean }): void;
allowedAnchors(): string[];
isSelectable(): boolean;
handleMouseover(e: KonvaEventObject): void;
Expand Down
1 change: 1 addition & 0 deletions code/packages/sdk/src/nodes/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export const augmentKonvaNodeClass = (
Konva.Node.prototype.closeCrop = function () {};
Konva.Node.prototype.resetCrop = function () {};
Konva.Node.prototype.dblClick = function () {};
Konva.Node.prototype.click = function () {};
Konva.Node.prototype.allowedAnchors = function () {
return [];
};
Expand Down
546 changes: 545 additions & 1 deletion code/packages/sdk/src/nodes/text/__tests__/text.test.ts

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions code/packages/sdk/src/nodes/text/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,18 @@ export const WEAVE_TEXT_NODE_DEFAULT_CONFIG: WeaveTextProperties = {
edition: {
borderSize: 2,
},
link: {
defaultColor: '#1155ccff',
hoverColor: '#3d7be0ff',
},
};

// Schemes allowed for the `link` attribute of a text node. Anything else
// (javascript:, data:, vbscript:, etc.) is rejected both at the schema
// level and again defensively at click-time, since the URL is untrusted
// user-authored content that another collaborator will click on.
export const WEAVE_TEXT_LINK_ALLOWED_PROTOCOLS = ['http:', 'https:'];

export const TEXT_LAYOUT = {
['SMART']: 'smart',
['AUTO_ALL']: 'auto-all',
Expand Down
Loading
Loading