{"id":18185055,"url":"https://github.com/jaandrle/simpleeditor","last_synced_at":"2026-05-15T18:34:29.100Z","repository":{"id":47864104,"uuid":"117277067","full_name":"jaandrle/SimpleEditor","owner":"jaandrle","description":"JS class for creating very simple text/html editor combinated with \u003ciframe\u003e element","archived":false,"fork":false,"pushed_at":"2023-03-03T17:30:18.000Z","size":556,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-09T15:36:37.821Z","etag":null,"topics":["chrome","designmode","editor","firefox","ie","iframe"],"latest_commit_sha":null,"homepage":"","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/jaandrle.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-01-12T18:54:33.000Z","updated_at":"2024-08-02T15:56:30.000Z","dependencies_parsed_at":"2025-10-09T15:36:39.178Z","dependency_job_id":"4dd2f6c4-12f7-44b2-93e7-565d7eab21d8","html_url":"https://github.com/jaandrle/SimpleEditor","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/jaandrle/SimpleEditor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaandrle%2FSimpleEditor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaandrle%2FSimpleEditor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaandrle%2FSimpleEditor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaandrle%2FSimpleEditor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaandrle","download_url":"https://codeload.github.com/jaandrle/SimpleEditor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaandrle%2FSimpleEditor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33074869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["chrome","designmode","editor","firefox","ie","iframe"],"created_at":"2024-11-02T22:05:50.437Z","updated_at":"2026-05-15T18:34:29.078Z","avatar_url":"https://github.com/jaandrle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![IE \u003c=9 - supported](https://img.shields.io/badge/IE%20%3C=9-supported-green.svg) ![IE \u003e9 - tested](https://img.shields.io/badge/IE%20%3E9-tested-brightgreen.svg) ![Firefox - tested](https://img.shields.io/badge/Firefox-tested-brightgreen.svg) ![Chrome - tested](https://img.shields.io/badge/Chrome-tested-brightgreen.svg)  ![Safari - tested](https://img.shields.io/badge/Safari-tested-brightgreen.svg)\n# SimpleEditor\nJS class for creating very simple text/html editor combinated with ```\u003ciframe\u003e``` element.\n\n**[Actual version](https://github.com/jaandrle/SimpleEditor/releases/tag/v0.7)**\n## Editor creation\n### JavaScript\n  ```javascript\n    var i_am_instance= class_SimpleEditor.init({\n        editor_element: iframe_NODE_element,\n        default_value: default_content\n    });\n  ```\n\n### HTML\n  ```html\n    \u003ciframe id=\"editor\" src='about:blank'\u003e\u003c/iframe\u003e\n    \u003cbutton onclick=\"i_am_instance.format('bold');\"\u003eBold\u003c/button\u003e\n```\n\n## Methods\n  - *format*(format_name): \n    * primary for using as *onclick* listener\n    * format_name= [DOMString](https://developer.mozilla.org/en-US/docs/Web/API/DOMString) command name (i.e. 'Commands List' below);\n  - *getContent*: return ```\u003ciframe\u003e``` HTML content\n  - *getTextContent*: return ```\u003ciframe\u003e``` text content\n\n## Commands List\n  - \"**bold**\", \"**italic**\", \"**underline**\": Toggle bold/italic format new or selected text\n  - \"**removeFormat**\": remove format\n  - \"**insertOrderedList**\", \"**insertUnorderedList**\", \"**insertParagraph**\": add ```\u003col\u003e```, ```\u003cul\u003e```, or ```\u003cp\u003e```\n  - \"**createEmail**\", \"**createLink**\", \"**insertImage**\": Toggle email, URL link or create image\n    * in case of email and URL link: the link is created from selected text (if detected), or you can add link via prompt\n    * \"**insertImage**\": for now no detection implemented (in aditional, you must combine this with some uploader)\n  - \"**justifyLeft**\", \"**justifyRight**\", \"**justifyCenter**\", \"**justifyFull**\": alingment change\n  - Another possibilites in [Document.execCommand()](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand)\n\n## Register validator\n  - Email example:\n    ```javascript\n      i_am_instance.setValidationFunction(\"createEmail\", function emailValidation(email_candidate) {\n        /*_@_*/ let e= email_candidate.split(\"@\"); if(e.length!==2) return false;\n        /*_@_._*/ e= [e[0], ...e[1].split(\".\")]; if(e.length!==3) return false;\n        const _e= !/(#|\\?|!|\\\\|\\/|\\||\\.\\.)/i.test(e[0]);\n        return _e \u0026\u0026 e.reduce((r,o)=\u003er\u0026\u0026o.length\u003e1\u0026\u0026!/\\s/.test(o), _e);\n      });\n    ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaandrle%2Fsimpleeditor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaandrle%2Fsimpleeditor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaandrle%2Fsimpleeditor/lists"}