{"id":23799562,"url":"https://github.com/vizir/ng-contenteditable","last_synced_at":"2025-06-20T18:10:37.862Z","repository":{"id":58234928,"uuid":"45300821","full_name":"Vizir/ng-contenteditable","owner":"Vizir","description":"Use ngModel and validations with contenteditable HTML5 attribute","archived":false,"fork":false,"pushed_at":"2019-03-16T05:18:52.000Z","size":78,"stargazers_count":11,"open_issues_count":3,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-21T13:06:47.979Z","etag":null,"topics":["angular","angular-components","angular-directives","angularjs","contenteditable"],"latest_commit_sha":null,"homepage":"http://vizir.github.io/ng-contenteditable/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vizir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-31T12:28:22.000Z","updated_at":"2021-01-28T22:23:44.000Z","dependencies_parsed_at":"2022-08-31T09:21:16.413Z","dependency_job_id":null,"html_url":"https://github.com/Vizir/ng-contenteditable","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Vizir/ng-contenteditable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vizir%2Fng-contenteditable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vizir%2Fng-contenteditable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vizir%2Fng-contenteditable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vizir%2Fng-contenteditable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vizir","download_url":"https://codeload.github.com/Vizir/ng-contenteditable/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vizir%2Fng-contenteditable/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260993952,"owners_count":23094275,"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":["angular","angular-components","angular-directives","angularjs","contenteditable"],"created_at":"2025-01-01T21:17:16.675Z","updated_at":"2025-06-20T18:10:32.832Z","avatar_url":"https://github.com/Vizir.png","language":"JavaScript","readme":"# ng-content-editable\n\nThis is a slightly extended fork of the npm package [ng-content-editable](https://www.npmjs.com/package/ng-content-editable).\n\n### Demo\nYou can tryout **ng-content-editable** [here](https://vizir.github.io/ng-contenteditable/).\n\n### Getting Started\nDownload the package, and include the `dist/ng-content-editable.min.js` file in your page.\n\n```bash\nnpm install ng-content-editable --save\n```\n\nThen add the content-editable module to your Angular App file, e.g.\n\n```js\nvar app = angular.module('app', [\"content-editable\"]);\n```\n\n### Usage\n\n```html\n\u003cdiv contenteditable\n     ng-model=\"model\"\n     ng-maxlength=255\n     ng-minlength=3\n     only-text=\"true\"\n     only-num=\"true\"\n     convert-new-lines=\"true\"\n     no-lf=\"true\"\n     no-trim=\"true\"\n\u003e\u003c/div\u003e\n```\n\n### Description of optional attributes\n| Attribute | Description| Example |\n| :------------- | :-------------| :----- |\n| ng-maxlength | The max-length for the attribute | 255 |\n| ng-minlength | The min-length for the attribute | 3 |\n| only-text | Remove all the html tags for the attribute value | true or false |\n| convert-new-lines | Convert all `\u003cbr\u003e`, `\u003cp\u003e` and `\u003cdiv\u003e` to `\\r\\n` | true or false |\n| only-num | Allow numbers 0-9, `.` and `,` only | true or false |\n| no-lf | Line breaks not allowed, results in single line | true or false |\n| no-trim | Disable default trim (removes whitespace from both ends of a string)  | true or false |\n\n\n### Contributing\n\nIt's easy for you to make a contribution, just open a PR on GitHub :)\n\nBut if this will be your first contribution to a JavaScript project, below are some steps that are useful during development.\n\nInstall the dev dependencies:\n\n```bash\nnpm install\n```\n\nGenerate the dist files:\n\n```bash\nnpm run build\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvizir%2Fng-contenteditable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvizir%2Fng-contenteditable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvizir%2Fng-contenteditable/lists"}