| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>vue html5 editor demo</title>
- <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/>
- <script src="../dist/vue-html5-editor.js"></script>
- <script src="https://cdn.bootcss.com/vue/2.2.6/vue.js"></script>
- <style>
- #app {
- margin: 50px auto;
- width: 800px;
- max-width: 100%;
- }
- .custom-icon {
- background-size: 100% 100%;
- display: inline-block;
- }
- .custom-icon.text {
- background-image: url(custom-icons/text.png);
- }
- .custom-icon.font {
- background-image: url(custom-icons/font.png);
- }
- .custom-icon.align {
- background-image: url(custom-icons/align.png);
- }
- .custom-icon.list {
- background-image: url(custom-icons/list.png);
- }
- .custom-icon.color {
- background-image: url(custom-icons/color.gif);
- }
- .custom-icon.eraser {
- background-image: url(custom-icons/eraser.gif);
- }
- .custom-icon.full-screen {
- background-image: url(custom-icons/full-screen.gif);
- }
- .custom-icon.hr {
- background-image: url(custom-icons/hr.gif);
- }
- .custom-icon.image {
- background-image: url(custom-icons/image.gif);
- }
- .custom-icon.link {
- background-image: url(custom-icons/link.gif);
- }
- .custom-icon.table {
- background-image: url(custom-icons/table.gif);
- }
- .custom-icon.undo {
- background-image: url(custom-icons/undo.gif);
- }
- .custom-icon.unlink {
- background-image: url(custom-icons/unlink.gif);
- }
- .custom-icon.info {
- background-image: url(custom-icons/info.png);
- }
- </style>
- </head>
- <body>
- <div id="app">
- <vue-html5-editor :content.sync="content" :height="500"></vue-html5-editor>
- </div>
- <script>
- Vue.use(VueHtml5Editor, {
- image: {compress: false},
- icons: {
- text: "custom-icon text",
- color: "custom-icon color",
- font: "custom-icon font",
- align: "custom-icon align",
- list: "custom-icon list",
- link: "custom-icon link",
- unlink: "custom-icon unlink",
- tabulation: "custom-icon table",
- image: "custom-icon image",
- "horizontal-rule": "custom-icon hr",
- eraser: "custom-icon eraser",
- hr: "custom-icon hr",
- undo: "custom-icon undo",
- "full-screen": "custom-icon full-screen",
- info: "custom-icon info ",
- }
- })
- new Vue({
- el: "#app",
- data: {
- content: "<h3>vue html5 editor</h3>",
- }
- })
- </script>
- </body>
- </html>
|