{"id":22468106,"url":"https://github.com/patternslib/pat-content-mirror","last_synced_at":"2025-03-27T15:43:47.858Z","repository":{"id":24427712,"uuid":"27829091","full_name":"Patternslib/pat-content-mirror","owner":"Patternslib","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-03T00:49:04.000Z","size":4687,"stargazers_count":0,"open_issues_count":19,"forks_count":1,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-05-22T19:04:21.958Z","etag":null,"topics":["hacktoberfest","javascript","patternslib","ui-components"],"latest_commit_sha":null,"homepage":"","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/Patternslib.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","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":"2014-12-10T16:41:52.000Z","updated_at":"2022-10-16T15:29:54.000Z","dependencies_parsed_at":"2024-12-06T11:15:12.550Z","dependency_job_id":"8c688164-2ef2-4d10-b294-0b207d831edb","html_url":"https://github.com/Patternslib/pat-content-mirror","commit_stats":{"total_commits":81,"total_committers":6,"mean_commits":13.5,"dds":"0.28395061728395066","last_synced_commit":"17ee0dbd69eabbd022b81468afd9cb80c5f591f3"},"previous_names":["ploneintranet/pat-content-mirror"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patternslib%2Fpat-content-mirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patternslib%2Fpat-content-mirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patternslib%2Fpat-content-mirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patternslib%2Fpat-content-mirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Patternslib","download_url":"https://codeload.github.com/Patternslib/pat-content-mirror/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245873818,"owners_count":20686655,"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","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":["hacktoberfest","javascript","patternslib","ui-components"],"created_at":"2024-12-06T11:15:09.809Z","updated_at":"2025-03-27T15:43:47.832Z","avatar_url":"https://github.com/Patternslib.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"pat-content-mirror\n==================\n\nA pattern that provides rich dynamic functionality to a textarea. It is used\nfor single-line text input that should be able to wrap into the next line.\nLine breaks, tabs or multiple space characters are not allowed, removed from\nthe text input and replaced with a single space character.\n\nThe main functionality is provided by maintaining a \"mirror\" element that\nis updated every time the main textarea is changed.  This element, which\ncan be specified using a CSS selector in the `target` option, sits behind the\ntextarea, and allows us to overcome the limitations of text-only content in\nthe html textarea element.  The user interacts with the textarea, mostly by\ntyping, and the .content-mirror reflects the textarea content, but can also\ncontain links to other users or tags.\n\nThe difference to a contenteditable element is, that a textarea automatically\nparticipates as a form element in form submissions and validation.\n\nThe pattern would typically be applied to a textarea element, though it is\nnot required.\nIn addition, another element must be present to act as the content mirror.\nWhen the designated content mirror is empty, the pattern injects a placeholder\nelement (`\u003cem class=\"placeholder\"\u003eLeave a comment\u003c/em\u003e`).\n\nBy default, the pattern looks for the content mirror using the CSS selector\n`p.content-mirror .text`, though this can be overridden by the `target`\noption.\n\nThe placeholder can be overridden by the `placeholder` attribute.\n\nThe example html below shows a structure that would work with the defaults:\n\n    \u003cp class=\"content-mirror\"\n        \u003e\u003cspan class=\"text\"\n        \u003e\u003cem class=\"placeholder\"\u003eLeave a comment\u003c/em\u003e\u003c/span\n        \u003e\u003c/p\u003e\n    \u003ctextarea placeholder=\"Leave a comment\" class=\"pat-content-mirror\"\u003e\u003c/textarea\u003e\n\n\n## Documentation\n\nProperty | Value | Default | Type | Description\n---------|-------|---------|------|------------\ntarget | a CSS selector | `p.content-mirror .text` | string | a CSS selector that indicates in which element(s) the content of the textarea should be mirrored\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatternslib%2Fpat-content-mirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatternslib%2Fpat-content-mirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatternslib%2Fpat-content-mirror/lists"}