{"id":16829628,"url":"https://github.com/rtfb/pagedown-editor","last_synced_at":"2025-04-11T04:03:42.000Z","repository":{"id":16586156,"uuid":"19340437","full_name":"rtfb/pagedown-editor","owner":"rtfb","description":"This is a Node package for PageDown editor, intended to be used with Browserify.","archived":false,"fork":false,"pushed_at":"2018-02-25T13:10:41.000Z","size":71,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T04:03:36.240Z","etag":null,"topics":["nodejs","pagedown"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rtfb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-01T09:17:47.000Z","updated_at":"2023-09-08T16:47:17.000Z","dependencies_parsed_at":"2022-08-04T10:00:08.714Z","dependency_job_id":null,"html_url":"https://github.com/rtfb/pagedown-editor","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtfb%2Fpagedown-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtfb%2Fpagedown-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtfb%2Fpagedown-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtfb%2Fpagedown-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rtfb","download_url":"https://codeload.github.com/rtfb/pagedown-editor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248339285,"owners_count":21087215,"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":["nodejs","pagedown"],"created_at":"2024-10-13T11:34:49.505Z","updated_at":"2025-04-11T04:03:41.980Z","avatar_url":"https://github.com/rtfb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node package for PageDown Editor\n\nThe original [PageDown][pagedown-repo] repo only packages server-side code in\nits [Node module][pagedown-module]. This package also packages the editor,\nintended to be used along with [Browserify](http://browserify.org/).\n\n## Installation\n\n``` sh\n$ npm install -g browserify\n$ npm install pagedown-editor\n```\n\n## Usage\n\nIn some file, say, [sample.js](sample.js), create an entry point to the editor:\n\n``` js\nvar editor = require(\"pagedown-editor\");\n\nfunction getPagedownEditor() {\n    return editor.getPagedownEditor();\n}\n\nglobal.window.getPagedownEditor = getPagedownEditor;\n```\n\nThen, during build time, browserify that file and copy the buttons and the\nstylesheet:\n\n``` sh\n$ browserify sample.js -o bundle.js\n$ cp node_modules/pagedown-editor/wmd-buttons.png static/\n$ cp node_modules/pagedown-editor/pagedown.css static/\n```\n\nFinally, use the bundle like this in your html:\n\n``` html\n\u003c!-- among headers, instead of Markdown.*.js, include your bundle: --\u003e\n\u003clink rel=\"stylesheet\" href=\"/static/pagedown.css\"\u003e\n\u003cscript type=\"text/javascript\" src=\"/static/bundle.js\"\u003e\u003c/script\u003e\n\n\u003c!-- ...\n    Then at the end of body, invoke the editor with this one-liner: --\u003e\n\u003cscript type=\"text/javascript\"\u003e\n(function () {\n     getPagedownEditor().run();\n     })();\n\u003c/script\u003e\n```\n\nFor your convenience there's a [sample.html](sample.html) with all of the above\nin one place. After installation it will work out of the box from within your\n`node_modules` directory, just direct your browser to `file:///\u003cpath\nto\u003e/node_modules/pagedown-editor/sample.html`.\n\n## License\n\nMIT license, see [LICENSE.txt](LICENSE.txt).\n\n[pagedown-repo]: https://github.com/StackExchange/pagedown\n[pagedown-module]: https://www.npmjs.org/package/pagedown\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtfb%2Fpagedown-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frtfb%2Fpagedown-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtfb%2Fpagedown-editor/lists"}