jgraph / jgraph/drawio

Make background page objects aware of page variables

Open
#3,104 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
8.2k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

This example shows a techical drawing with a data field.
This is my literal use case. It utilizes the global standard placeholders (e. g. %pagenumber%).

However, I often find usecases where I want to add additional fields on a per page basis like e. g. a document status (draft, final, etc.) or author. This is similar to feature request #480 which asks for document-wide placeholders which could be useful, too but are not a necessity for background pages as in this case static text works just fine.

The example given in #480 could work wonderfully, if only background page objects could use page variables.

Example

  • A text field on a background page uses variable %author%.
  • On the background page the variable is set to Alice.
  • Each page will now show the name Alice.
  • Some pages however may define a different author. Still using the background page object but overwriting the placeholder value.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the background-page behavior described in the linked example and review feature request #480 for the related placeholder semantics. Trace how page variables are defined and resolved for background page objects; done means a background value is inherited by each page and can be overridden on individual pages.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.