{"id":13470154,"url":"https://github.com/mindmup/bootstrap-wysiwyg","last_synced_at":"2025-10-22T21:22:40.177Z","repository":{"id":7854637,"uuid":"9226653","full_name":"mindmup/bootstrap-wysiwyg","owner":"mindmup","description":"Tiny bootstrap-compatible WISWYG rich text editor","archived":true,"fork":true,"pushed_at":"2018-11-16T05:35:52.000Z","size":964,"stargazers_count":5564,"open_issues_count":134,"forks_count":847,"subscribers_count":342,"default_branch":"master","last_synced_at":"2024-05-21T11:29:25.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"steveathon/bootstrap-wysiwyg","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mindmup.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":"2013-04-04T19:54:42.000Z","updated_at":"2024-05-19T11:52:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mindmup/bootstrap-wysiwyg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindmup%2Fbootstrap-wysiwyg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindmup%2Fbootstrap-wysiwyg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindmup%2Fbootstrap-wysiwyg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindmup%2Fbootstrap-wysiwyg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mindmup","download_url":"https://codeload.github.com/mindmup/bootstrap-wysiwyg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222138879,"owners_count":16937421,"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":[],"created_at":"2024-07-31T16:00:24.030Z","updated_at":"2025-10-22T21:22:39.858Z","avatar_url":"https://github.com/mindmup.png","language":"HTML","funding_links":[],"categories":["HTML","Misc","Editors","Editors [🔝](#readme)","编辑器"],"sub_categories":["Runner","运行器","运行器e2e测试"],"readme":"bootstrap-wysiwyg\n=================\n\nImportant information for Github requests/issues\n------------------------------------------------\n\nPlease do not submit issues/comments to this repo. Instead, submit it to\n\nhttps://github.com/steveathon/bootstrap-wysiwyg\n\nAlthough this is the original repository, we need the project to be tiny and\nfocused on the needs of the MindMup tool, which means that we do not want to\ncomplicate it with all the various bits and pieces needed for other usages and\nolder browsers.\n\nMeanwhile, Steve was kind enough to create a fork, backport it to older\nbrowsers, extend and integrate all kinds of changes. Steve's fork does not need\nto stay small, slim and focused, so please use his repo for all your needs if\nthis plugin does provide out of the box\n\nAbout the editor\n----------------\n\nTiny bootstrap-compatible WISWYG rich text editor, based on browser execCommand, built originally for [MindMup](http://www.mindmup.com). Here are the key features:\n\n* Automatically binds standard hotkeys for common operations on Mac and Windows\n* Drag and drop files to insert images, support image upload (also taking photos on mobile devices)\n* Allows a custom built toolbar, no magic markup generators, enabling the web site to use all the goodness of Bootstrap, Font Awesome and so on...\n* Does not force any styling - it's all up to you\n* Uses standard browser features, no magic non-standard code, toolbar and keyboard configurable to execute any supported [browser command](https://developer.mozilla.org/en/docs/Rich-Text_Editing_in_Mozilla\n)\n* Does not create a separate frame, backup text areas etc - instead keeps it simple and runs everything inline in a DIV\n* (Optionally) cleans up trailing whitespace and empty divs and spans\n* Requires a modern browser (tested in Chrome 26, Firefox 19, Safari 6)\n* Supports mobile devices (tested on IOS 6 Ipad/Iphone and Android 4.1.1 Chrome)\n\nBasic Usage\n-----------\n\nSee http://mindmup.github.com/bootstrap-wysiwyg/\n\nCustomising\n-----------\nYou can assign commands to hotkeys and toolbar links. For a toolbar link, just put the execCommand command name into a data-edit attribute.\nFor more info on execCommand, see http://www.quirksmode.org/dom/execCommand.html and https://developer.mozilla.org/en/docs/Rich-Text_Editing_in_Mozilla\n\n```html\n\u003cdiv class=\"btn-toolbar\" data-role=\"editor-toolbar\" data-target=\"#editor\"\u003e\n  \u003ca class=\"btn btn-large\" data-edit=\"bold\"\u003e\u003ci class=\"icon-bold\"\u003e\u003c/i\u003e\u003c/a\u003e\n\u003c/div\u003e\n```\n\nTo pass arguments to a command, separate a command with a space.\n\n```html\n  \u003ca data-edit=\"fontName Arial\"\u003e...\u003c/a\u003e\n```\n\nYou can also use input type='text' with a data-edit attribute. When the value\nis changed, the command from the data-edit attribute will be applied using the\ninput value as the command argument\n\n```html\n\u003cinput type=\"text\" data-edit=\"createLink\"\u003e\n```\nIf the input type is file, when a file is selected the contents will be read in using the FileReader API and the data URL will be used as the argument\n\n```html\n\u003cinput type=\"file\" data-edit=\"insertImage\"\u003e\n```\n\nTo change hotkeys, specify the map of hotkeys to commands in the hotKeys option. For example:\n\n```javascript\n$('#editor').wysiwyg({\n  hotKeys: {\n    'ctrl+b meta+b': 'bold',\n    'ctrl+i meta+i': 'italic',\n    'ctrl+u meta+u': 'underline',\n    'ctrl+z meta+z': 'undo',\n    'ctrl+y meta+y meta+shift+z': 'redo'\n  }\n});\n```\n\nStyling for mobile devices\n--------------------------\n\nThis editor should work pretty well with mobile devices, but you'll need to consider the following things when styling it:\n- keyboards on mobile devices take a huge part of the screen\n- having to scroll the screen to touch the toolbar can cause the editing component to lose focus, and the mobile device keyboard might go away\n- mobile devices tend to move the screen viewport around to ensure that the focused element is shown, so it's best that the edit box is glued to the top\n\nFor the content attachment editor on MindMup, we apply the following rules to mobile device styling:\n- edit box is glued to the top, so the focus doesn't jump around\n- toolbar is below the edit box\n- on portrait screens, edit box size is 50% of the screen\n- on landscape screens, edit box size is 30% of the screen\n- as the screen gets smaller, non-critical toolbar buttons get hidden into a \"other\" menu\n\nDependencies\n------------\n* jQuery http://jquery.com/\n* jQuery HotKeys https://github.com/jeresig/jquery.hotkeys\n* Bootstrap http://twitter.github.com/bootstrap/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmindmup%2Fbootstrap-wysiwyg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmindmup%2Fbootstrap-wysiwyg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmindmup%2Fbootstrap-wysiwyg/lists"}