{"_id":"bootstrap-wysiwyg","_rev":"8-9e0cab2d35c9260bf68cb0ae42ed043f","name":"bootstrap-wysiwyg","description":"A tiny Bootstrap and jQuery based WYSIWYG rich text editor based on the browser function execCommand.","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.4":{"name":"bootstrap-wysiwyg","version":"1.0.4","description":"A tiny Bootstrap and jQuery based WYSIWYG rich text editor based on the browser function execCommand.","contributors":[{"name":"Steve King","url":"https://github.com/steveathon"},{"name":"Tyler Hughes","url":"https://github.com/RandomlyKnighted"}],"dependencies":{},"devDependencies":{"check-pages":"^0.9.0","grunt":"^0.4.5","grunt-bootlint":"^0.9.1","grunt-bumpup":"^0.6.2","grunt-check-pages":"^0.9.0","grunt-contrib-jshint":"^0.11.2","grunt-contrib-rename":"^0.0.3","grunt-contrib-uglify":"^0.9.1","grunt-contrib-watch":"^0.6.1","grunt-release":"^0.13.0","gulp":"^3.9.0","gulp-bootlint":"^0.5.0","gulp-html5-lint":"^1.0.1","gulp-jshint":"^1.11.0","gulp-rename":"^1.2.2","gulp-uglify":"^1.2.0"},"repository":{"type":"git","url":"https://github.com/steveathon/bootstrap-wysiwyg"},"keywords":["css","js","responsive","front-end","web","wysiwyg","editor"],"license":"MIT","private":false,"bugs":{"url":"https://github.com/steveathon/bootstrap-wysiwyg/issues"},"homepage":"https://github.com/steveathon/bootstrap-wysiwyg","_id":"bootstrap-wysiwyg@1.0.4","scripts":{},"_shasum":"bcb8c6505bc54d8a8d88b0799558fe56fe0f5512","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.1","_npmUser":{"name":"artf","email":"artur.catch@hotmail.it"},"dist":{"shasum":"bcb8c6505bc54d8a8d88b0799558fe56fe0f5512","tarball":"https://registry.npmjs.org/bootstrap-wysiwyg/-/bootstrap-wysiwyg-1.0.4.tgz","integrity":"sha512-LOCrCb2+Im95msmq43L3doU062KN57YIMVOlTfIeYjLrRFScXDN8UOXaA8zoxX22oQGNN55g76+2TTK75UhImw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAeKdPrxz+OXicNK6C0w77hxx0BwSYhSXimkhhaA7ZcbAiAqApw1mbdEulV4uwVuJ1vHdsLfpIMReIe+f3C0HRdUmw=="}]},"maintainers":[{"name":"artf","email":"artur.catch@hotmail.it"}]},"2.0.1":{"name":"bootstrap-wysiwyg","version":"2.0.1","description":"A tiny Bootstrap and jQuery based WYSIWYG rich text editor based on the browser function execCommand.","contributors":[{"name":"Steve King","url":"https://github.com/steveathon"},{"name":"Tyler Hughes","url":"https://github.com/RandomlyKnighted"}],"main":"js/bootstrap-wysiwyg.min.js","dependencies":{},"devDependencies":{"check-pages":"^0.9.0","grunt":"^0.4.5","grunt-bootlint":"^0.9.1","grunt-bumpup":"^0.6.2","grunt-check-pages":"^0.9.0","grunt-contrib-jshint":"^0.11.2","grunt-contrib-rename":"^0.0.3","grunt-contrib-uglify":"^0.9.1","grunt-contrib-watch":"^0.6.1","grunt-jscs":"^2.5.0","grunt-release":"^0.13.0","gulp":"^3.9.0","gulp-bootlint":"^0.5.0","gulp-html5-lint":"^1.0.1","gulp-jshint":"^1.11.0","gulp-rename":"^1.2.2","gulp-uglify":"^1.2.0"},"scripts":{"test":"grunt jscs"},"repository":{"type":"git","url":"git+https://github.com/steveathon/bootstrap-wysiwyg.git"},"keywords":["css","js","responsive","front-end","web","wysiwyg","editor"],"license":"MIT","private":false,"bugs":{"url":"https://github.com/steveathon/bootstrap-wysiwyg/issues"},"homepage":"https://github.com/steveathon/bootstrap-wysiwyg","gitHead":"8e0e34d5ec43e424aedd6b47f2c3bc39e2def1aa","_id":"bootstrap-wysiwyg@2.0.1","_shasum":"ed9c7a7e2e33c5931b0f8d974c11268baf39a8ba","_from":".","_npmVersion":"3.10.9","_nodeVersion":"5.6.0","_npmUser":{"name":"artf","email":"artur.catch@hotmail.it"},"dist":{"shasum":"ed9c7a7e2e33c5931b0f8d974c11268baf39a8ba","tarball":"https://registry.npmjs.org/bootstrap-wysiwyg/-/bootstrap-wysiwyg-2.0.1.tgz","integrity":"sha512-lZsz2sU0NoOJmUaVg86ZJHmNXSfAb13EThfzMhY1K/nUAXPHcBPAxvG3sIfaonKkchEDDAI1jAWxQUsmvsOR4A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIALfzwabu9dDnCyEPJvKGkXS+yg9YEn3IIoKmcZB5sUNAiEAtF8CM6eyr6aAXjSnJ8rDB9rj0yMLQvH+MuALJ9aqFcs="}]},"maintainers":[{"name":"artf","email":"artur.catch@hotmail.it"},{"name":"steveathon","email":"steve@abilio.com.au"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/bootstrap-wysiwyg-2.0.1.tgz_1486812844573_0.8404661014210433"}}},"readme":"bootstrap-wysiwyg\n=================\n[![GitHub release](https://img.shields.io/github/release/steveathon/bootstrap-wysiwyg.svg?maxAge=2592000)](https://github.com/steveathon/bootstrap-wysiwyg)\n[![GitHub license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/steveathon/bootstrap-wysiwyg)\n\nA tiny Bootstrap and jQuery based WYSIWYG rich text editor based on the browser function execCommand.\n\nThis project was originally built for [MindMup](http://www.mindmup.com) and has now been adapted and modified to suit a wide range of projects.\n\nDevelopment is active, and ongoing.\n\nFeatures\n-----------\n\n* Automatically binds standard hotkeys for common operations on Mac and Windows\n* Allows a custom built toolbar with no magic markup generators enabling the web site to use all the goodness of Bootstrap\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 (See SUPPORTED)\n* Supports mobile devices (See SUPPORTED)\n* Supports multiple instances\n* HTML Sanitization\n* Drag and drop files to insert images\n* Supports image upload\n* Supports image capture on mobile devices\n* Events\n\nBasic Usage\n-----------\n\n```javascript\n$('#editor').wysiwyg();\n```\n\nDon't forget to style your editor div:\n\n```css\n#editor {overflow:scroll; max-height:300px}\n```\n\nIf you want to use this for a mobile web site, make sure to read about [how to style it](https://github.com/mindmup/bootstrap-wysiwyg#styling-for-mobile-devices) to optimise mobile screen usage and experience (please note that this demo page isn't optimised for mobile access).\n\nOptionally, also create a toolbar (see the source of this page for an example):\n\n```html\n<div class=\"btn-toolbar\" data-role=\"editor-toolbar\"\n        data-target=\"#editor\">\n  ...\n</div> \n```\n\nIn the toolbar, execute simple commands by adding a data-edit attribute to a link.\n\n```html\n<a data-edit=\"bold\">...</a>\n```\n\nexecute more complex commands by adding an argument after a blank or providing an input with a data-edit command (the input value is used as an argument). In case of file inputs, the file contents are read in using the FileReader API and used as the command value.\n\n```html\n<a data-edit=\"fontName Arial\">...</a>\n...\n<input type=\"text\" data-edit=\"createLink\"/>\n...\n<input type=\"file\" data-edit=\"insertImage\" />\n```\n\nUse standard jQuery methods to access and set content and focus. You can also ask for cleaned up HTML content:\n\n```javascript\n$('#editor').cleanHtml()\n```\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 the [QuirksMode](http://www.quirksmode.org/dom/execCommand.html) and [Mozilla Developer](https://developer.mozilla.org/en/docs/Rich-Text_Editing_in_Mozilla) documentation.\n\n```html\n<div class=\"btn-toolbar\" data-role=\"editor-toolbar\" data-target=\"#editor\">\n  <a class=\"btn btn-large\" data-edit=\"bold\"><i class=\"icon-bold\"></i></a>\n</div>\n```\n\nTo pass arguments to a command, separate a command with a space.\n\n```html\n  <a data-edit=\"fontName Arial\">...</a>\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<input type=\"text\" data-edit=\"createLink\">\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<input type=\"file\" data-edit=\"insertImage\">\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\nEvents\n------\n\n#### Change\nFired whenever anything changes. See this example [events.html](examples/events.html)\n```javascript\n$('#editor').wysiwyg().on('change', function(){\n\talert('something has been changed on the editor');\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\nThanks to\n------------\n@gojko \t\t\t\t\t@mindmup\t\t\t@jordanh\n@beatnbite\t\t\t\t@brutuscat\t\t\t@VictorBjelkholm\n@mrmrs \t\t\t\t\t@tilleryd \t\t\t@pnevels\n\nHistory\n------------\n\nThe original version of this code (below) appeared to be no longer maintained. There\nwere a number of outstanding changes which needed to be merged in and a few which\nincluded performance and feature improvements. These have now been included in this\nmaster branch.\n\nI'll keep an eye out for future changes/improvements and pull them in as required.\n\n- Steve\n\nOriginal Licence\n------------\n\nThe original version of this tool can be found here:\n[bootstrap-wysiwyg](https://github.com/mindmup/bootstrap-wysiwyg)\n\nThe MIT License\n\nCopyright (c) 2013 Damjan Vujnovic, David de Florinier, Gojko Adzic\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","maintainers":[{"name":"artf","email":"artur.catch@hotmail.it"},{"name":"steveathon","email":"steve@abilio.com.au"}],"time":{"modified":"2022-06-13T04:57:49.571Z","created":"2016-01-19T23:10:21.200Z","1.0.4":"2016-01-19T23:10:21.200Z","2.0.1":"2017-02-11T11:34:06.632Z"},"homepage":"https://github.com/steveathon/bootstrap-wysiwyg","keywords":["css","js","responsive","front-end","web","wysiwyg","editor"],"repository":{"type":"git","url":"git+https://github.com/steveathon/bootstrap-wysiwyg.git"},"contributors":[{"name":"Steve King","url":"https://github.com/steveathon"},{"name":"Tyler Hughes","url":"https://github.com/RandomlyKnighted"}],"bugs":{"url":"https://github.com/steveathon/bootstrap-wysiwyg/issues"},"license":"MIT","readmeFilename":"README.md","users":{"indianexplorer":true,"subbe":true,"steveathon":true}}