{"id":16241648,"url":"https://github.com/tve/node-red-fd-svg","last_synced_at":"2025-10-08T06:52:13.889Z","repository":{"id":65548764,"uuid":"587193625","full_name":"tve/node-red-fd-svg","owner":"tve","description":"Node-RED Node with SVG Widget for the FlexDash dashboard","archived":false,"fork":false,"pushed_at":"2023-01-29T01:40:01.000Z","size":1247,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-08T09:53:05.248Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tve.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-10T07:13:42.000Z","updated_at":"2023-01-22T16:44:04.000Z","dependencies_parsed_at":"2023-02-15T18:30:53.087Z","dependency_job_id":null,"html_url":"https://github.com/tve/node-red-fd-svg","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/tve/node-red-fd-svg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tve%2Fnode-red-fd-svg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tve%2Fnode-red-fd-svg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tve%2Fnode-red-fd-svg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tve%2Fnode-red-fd-svg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tve","download_url":"https://codeload.github.com/tve/node-red-fd-svg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tve%2Fnode-red-fd-svg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278903006,"owners_count":26065786,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T14:08:12.894Z","updated_at":"2025-10-08T06:52:13.869Z","avatar_url":"https://github.com/tve.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node-RED FlexDash SVG\n\n## FlexDash HTML widget\n\nThis node \u0026 widget displays raw HTML in FlexDash and allows a Node-RED flow to alter the\nHTML via messages.\n\nMessages may have the following fields:\n\n- `payload` - a string containing HTML to replace the entire contents of the widget\n- `selector` - a CSS selector to select elements to operate on\n- `command` - a string containing a command to execute on the selected elements, see below\n- `args` - an array of arguments to pass to the command\n- `commands` - an array of commands to execute, each element must contain a `command` an\n  `args` field and optionally a `selector` field (the latter defaults to the HTML root!)\n\nThe fields are processed in the following order: first `html`, then `selector`, `command`\nand `args`, then `commands`.\n\n### Selectors\n\nStandard selectors for ID (`#id`), class (`.class`) and attribute (`[attr]` or `[attr=value]`)\nare supported. The ` ` (space) combinator is supported, other combinators are not.\n\nWhen an array of commands is specified, the `selector` field may have the value `.` to refer to\nthe same elements as the previous command in the same message.\n\n### HTML elements in arguments\n\nSome commands, such as `append` and `prepend`, take HTML elements as arguments.\nThese must be Javascript objects with fields `tag` (the tag name), `attrs` (the\nattributes including `id` and `class` if desired) and optionally `children` (an array of child\nelements) or `text` (the text content of the element).\nElements with `text` must have a tag of `span` and no children.\n\n### Command list\n\nThe commands are loosely patterned after JQuery.\n\n**Commands that return something should output a message but currently don't**\n\n- `id` - set the ID of the element to `args[0]`\n- `addClass` - add `args[...]` to the classes of the element\n- `hasClass` - check whether any of the elements has class `args[0]`, returns a boolean\n- `removeClass` - remove `args[...]` from the classes of the element\n- `attr` - if `args.length==1` return an array with the values of the attribute `args[0]` for\n  each selected element, if `args.length==2` set the attribute `args[0]` to the value `args[1]`\n  for each element\n- `hasAttr` - check whether any of the elements has attribute `args[0]`, returns a boolean\n  (doesn't exist in JQuery)\n- `text` - if `args.length==0` get the \"inner text\" of the selected elements (concatenated),\n  else set the \"inner text\" of the selected elements to `args[0]` creating span elements,\n  which is equivalent to bare text in HTML\n  (currently there is no escaping done of `\u003c`, but that will be added...)\n- `html` - set the \"inner HTML\" of the selected elements to `args[0]`, i.e., parse the HTML and\n  set the resulting elements as children of the selected elements\n- `append` - append elements `args[0...]` to each of the selected elements\n- `prepend` - prepend elements `args[0...]` to each of the selected elements\n- `empty` - remove all children of the selected elements\n- `remove` - remove the selected elements\n- `replaceWith` - replace the selected elements with elements `args[0...]`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftve%2Fnode-red-fd-svg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftve%2Fnode-red-fd-svg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftve%2Fnode-red-fd-svg/lists"}