dragon-editor 2.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/License.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) lovefield 2023
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,178 @@
1
+ [![Github stars](https://img.shields.io/github/stars/lovefields/dragonEditor)](https://github.com/lovefields/dragonEditor/stargazers)
2
+ [![Github issues](https://img.shields.io/github/issues/lovefields/dragonEditor)](https://github.com/lovefields/dragonEditor/issues)
3
+ [![Github forks](https://img.shields.io/github/forks/lovefields/dragonEditor)](https://github.com/lovefields/dragonEditor/network/members)
4
+ [![Github top language](https://img.shields.io/github/languages/top/lovefields/dragonEditor)](https://github.com/lovefields/dragonEditor/)
5
+ [![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Flovefields%2FdragonEditor&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false)](https://hits.seeyoufarm.com)
6
+
7
+ [KO](https://github.com/lovefields/dragonEditor/blob/main/README.md) / [EN](https://github.com/lovefields/dragonEditor/blob/main/README_en.md)
8
+
9
+ # DragonEditor
10
+
11
+ 드래곤 에디터는 그냥 블로그에 쓸 이지윅 에디터가 필요해서 만들었습니다.<br>커스터마이징이 가능하며 AMP 페이지를 지원합니다.
12
+
13
+ ## 브라우저 지원
14
+ - Chrome 55+
15
+ - Safari 13+
16
+ - Firefox 63+
17
+ - Edge 79+
18
+ - IOS 11+
19
+ - Android 7+
20
+
21
+ IE 따위는 지원하지 않습니다.
22
+
23
+ ## 플러그인
24
+
25
+ 코드블럭을 사용하는 경우만 사용합니다.<br>
26
+ ~~직접 만들려고 했는데 미친 짓인 것 같네요~~
27
+
28
+ - `highlight.js` [(Link)](https://highlightjs.org/)
29
+
30
+ ## 사용법
31
+
32
+ ### 에디터 페이지
33
+ ```html
34
+ <!--
35
+ * 코드 블럭을 사용한다면 구글 폰트(Inconsolata)를 불러옵니다.
36
+ * 에디터 CSS를 로드합니다.
37
+ -->
38
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;700&amp;display=swap">
39
+ <link rel="stylesheet" href="[yourdir]/dragonEditor.css">
40
+
41
+ <!--
42
+ * editor-dragon 클레스를 지정합니다.
43
+ -->
44
+ <div class="editor-dragon"></div>
45
+
46
+ <!--
47
+ * 코드 블럭을 사용할 경우 플러그인을 불러오세요.
48
+ * 에디터 JS를 로드합니다.
49
+ -->
50
+ <script src="[yourdir]/highlight.pack.js"></script>
51
+ <script src="[yourdir]/dragonEditor.js"></script>
52
+ <script>
53
+ const editor = new DragonEditor();
54
+ // 위나 아래처럼 사용 가능합니다
55
+ const editor = new DragonEditor({
56
+ key: "value",
57
+ });
58
+ </script>
59
+ ```
60
+
61
+ ### 뷰 페이지
62
+ ```html
63
+ <!--
64
+ * 코드 블럭을 사용한다면 구글 폰트(Inconsolata)를 불러옵니다.
65
+ * 뷰페이지용 CSS를 로드합니다.
66
+ * [code] 값은 convertor를 사용한 결과값입니다.(view-convertor 폴더 참조)
67
+ -->
68
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;700&amp;display=swap">
69
+ <link rel="stylesheet" href="[yourdir]/dragonEditorViewer.css">
70
+
71
+ <div class="editor-dragon-viewer">[code]</div>
72
+ ```
73
+
74
+ ## 데모 페이지
75
+ [Demo page](https://lovefields.github.io/dragonEditor/examples)
76
+
77
+ ## 문서
78
+
79
+ - [DragonEditor Document](https://lovefields.github.io/dragonEditor-doc/)
80
+
81
+
82
+
83
+
84
+ //////////////////
85
+ <!--
86
+ Get your module up and running quickly.
87
+
88
+ Find and replace all on all files (CMD+SHIFT+F):
89
+ - Name: My Module
90
+ - Package name: my-module
91
+ - Description: My new Nuxt module
92
+ -->
93
+
94
+ # My Module
95
+
96
+ [![npm version][npm-version-src]][npm-version-href]
97
+ [![npm downloads][npm-downloads-src]][npm-downloads-href]
98
+ [![License][license-src]][license-href]
99
+ [![Nuxt][nuxt-src]][nuxt-href]
100
+
101
+ My new Nuxt module for doing amazing things.
102
+
103
+ - [✨ &nbsp;Release Notes](/CHANGELOG.md)
104
+ <!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/my-module?file=playground%2Fapp.vue) -->
105
+ <!-- - [📖 &nbsp;Documentation](https://example.com) -->
106
+
107
+ ## Features
108
+
109
+ <!-- Highlight some of the features your module provide here -->
110
+ - ⛰ &nbsp;Foo
111
+ - 🚠 &nbsp;Bar
112
+ - 🌲 &nbsp;Baz
113
+
114
+ ## Quick Setup
115
+
116
+ 1. Add `my-module` dependency to your project
117
+
118
+ ```bash
119
+ # Using pnpm
120
+ pnpm add -D my-module
121
+
122
+ # Using yarn
123
+ yarn add --dev my-module
124
+
125
+ # Using npm
126
+ npm install --save-dev my-module
127
+ ```
128
+
129
+ 2. Add `my-module` to the `modules` section of `nuxt.config.ts`
130
+
131
+ ```js
132
+ export default defineNuxtConfig({
133
+ modules: [
134
+ 'my-module'
135
+ ]
136
+ })
137
+ ```
138
+
139
+ That's it! You can now use My Module in your Nuxt app ✨
140
+
141
+ ## Development
142
+
143
+ ```bash
144
+ # Install dependencies
145
+ npm install
146
+
147
+ # Generate type stubs
148
+ npm run dev:prepare
149
+
150
+ # Develop with the playground
151
+ npm run dev
152
+
153
+ # Build the playground
154
+ npm run dev:build
155
+
156
+ # Run ESLint
157
+ npm run lint
158
+
159
+ # Run Vitest
160
+ npm run test
161
+ npm run test:watch
162
+
163
+ # Release new version
164
+ npm run release
165
+ ```
166
+
167
+ <!-- Badges -->
168
+ [npm-version-src]: https://img.shields.io/npm/v/my-module/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
169
+ [npm-version-href]: https://npmjs.com/package/my-module
170
+
171
+ [npm-downloads-src]: https://img.shields.io/npm/dm/my-module.svg?style=flat&colorA=18181B&colorB=28CF8D
172
+ [npm-downloads-href]: https://npmjs.com/package/my-module
173
+
174
+ [license-src]: https://img.shields.io/npm/l/my-module.svg?style=flat&colorA=18181B&colorB=28CF8D
175
+ [license-href]: https://npmjs.com/package/my-module
176
+
177
+ [nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js
178
+ [nuxt-href]: https://nuxt.com
package/README_en.md ADDED
@@ -0,0 +1,78 @@
1
+ [![Github stars](https://img.shields.io/github/stars/lovefields/dragonEditor)](https://github.com/lovefields/dragonEditor/stargazers)
2
+ [![Github issues](https://img.shields.io/github/issues/lovefields/dragonEditor)](https://github.com/lovefields/dragonEditor/issues)
3
+ [![Github forks](https://img.shields.io/github/forks/lovefields/dragonEditor)](https://github.com/lovefields/dragonEditor/network/members)
4
+ [![Github top language](https://img.shields.io/github/languages/top/lovefields/dragonEditor)](https://github.com/lovefields/dragonEditor/)
5
+ [![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Flovefields%2FdragonEditor&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false)](https://hits.seeyoufarm.com)
6
+
7
+ [KO](https://github.com/lovefields/dragonEditor/blob/main/README.md) &#47; [EN](https://github.com/lovefields/dragonEditor/blob/main/README_en.md)
8
+
9
+ # DragonEditor
10
+
11
+ I made WYSIWYG DragonEditor because just i needed an WYSIWYG editor to use in my blog.<br>Well DragonEditor has any customized option and support AMP page.
12
+
13
+ ## Support browser
14
+ - Chrome 55+
15
+ - Safari 13+
16
+ - Firefox 63+
17
+ - Edge 79+
18
+ - IOS 11+
19
+ - Android 7+
20
+
21
+ We never ever support IE.
22
+
23
+ ## Plugin
24
+
25
+ If you using `codeblock`, import this plugin.
26
+
27
+ - `highlight.js` [(Link)](https://highlightjs.org/)
28
+
29
+ ## Using
30
+
31
+ # editor
32
+ ```html
33
+ <!--
34
+ * Load Google font(Inconsolata) if you using code block.
35
+ * Load DragonEditor CSS
36
+ -->
37
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;700&amp;display=swap">
38
+ <link rel="stylesheet" href="[yourdir]/dragonEditor.css">
39
+
40
+ <!--
41
+ * Set editor-dragon class element.
42
+ -->
43
+ <div class="editor-dragon"></div>
44
+
45
+ <!--
46
+ * Load highlight plugin if you using code block.
47
+ * Load dragonEditor js
48
+ -->
49
+ <script src="[yourdir]/highlight.pack.js"></script>
50
+ <script src="[yourdir]/dragonEditor.js"></script>
51
+ <script>
52
+ const editor = new DragonEditor();
53
+ // OR
54
+ const editor = new DragonEditor({
55
+ key: "value",
56
+ });
57
+ </script>
58
+ ```
59
+
60
+ # viewer
61
+ ```html
62
+ <!--
63
+ * Load Google font(Inconsolata) if you using code block.
64
+ * Load DragonEditorViewer CSS
65
+ * The [code] value is the result with converter (see view-convertor folder).
66
+ -->
67
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;700&amp;display=swap">
68
+ <link rel="stylesheet" href="[yourdir]/dragonEditorViewer.css">
69
+
70
+ <div class="editor-dragon-viewer">[code]</div>
71
+ ```
72
+
73
+ ## Demo
74
+ [Demo page](https://lovefields.github.io/dragonEditor/examples)
75
+
76
+ ## Document
77
+
78
+ - [DragonEditor Document](https://lovefields.github.io/dragonEditor-doc/)
@@ -0,0 +1,5 @@
1
+ module.exports = function(...args) {
2
+ return import('./module.mjs').then(m => m.default.call(this, ...args))
3
+ }
4
+ const _meta = module.exports.meta = require('./module.json')
5
+ module.exports.getMeta = () => Promise.resolve(_meta)
@@ -0,0 +1,5 @@
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
+
3
+ declare const _default: _nuxt_schema.NuxtModule<_nuxt_schema.ModuleOptions>;
4
+
5
+ export { _default as default };
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "dragon-editor",
3
+ "configKey": "dragon-editor",
4
+ "version": "2.0.0-beta.1"
5
+ }
@@ -0,0 +1,16 @@
1
+ import { defineNuxtModule, createResolver, addComponent } from '@nuxt/kit';
2
+
3
+ const module = defineNuxtModule({
4
+ meta: {
5
+ name: "dragon-editor"
6
+ },
7
+ setup(options, nuxt) {
8
+ const resolver = createResolver(import.meta.url);
9
+ addComponent({
10
+ name: "DragonEditorComment",
11
+ filePath: resolver.resolve("./runtime/components/DragonEditorComment")
12
+ });
13
+ }
14
+ });
15
+
16
+ export { module as default };
@@ -0,0 +1,7 @@
1
+
2
+ import { } from './module'
3
+
4
+
5
+
6
+
7
+ export { default } from './module'
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "dragon-editor",
3
+ "version": "2.0.0-beta.1",
4
+ "description": "WYSIWYG editor on Nuxt.js",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/lovefields/dragonEditor.git"
8
+ },
9
+ "license": "MIT",
10
+ "type": "module",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/types.d.ts",
14
+ "import": "./dist/module.mjs",
15
+ "require": "./dist/module.cjs"
16
+ }
17
+ },
18
+ "main": "./dist/module.cjs",
19
+ "types": "./dist/types.d.ts",
20
+ "files": [
21
+ "dist"
22
+ ],
23
+ "scripts": {
24
+ "prepack": "nuxt-module-build",
25
+ "dev": "nuxi dev playground",
26
+ "dev:build": "nuxi build playground",
27
+ "dev:prepare": "nuxt-module-build --stub && nuxi prepare playground",
28
+ "release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
29
+ "lint": "eslint .",
30
+ "test": "vitest run",
31
+ "test:watch": "vitest watch"
32
+ },
33
+ "dependencies": {
34
+ "@nuxt/kit": "^3.5.0"
35
+ },
36
+ "devDependencies": {
37
+ "@nuxt/eslint-config": "^0.1.1",
38
+ "@nuxt/module-builder": "^0.3.1",
39
+ "@nuxt/schema": "^3.5.0",
40
+ "@nuxt/test-utils": "^3.5.0",
41
+ "@types/node": "^18",
42
+ "changelogen": "^0.5.3",
43
+ "eslint": "^8.40.0",
44
+ "nuxt": "^3.5.0",
45
+ "vitest": "^0.31.0"
46
+ },
47
+ "keywords": [
48
+ "editor",
49
+ "wysiwyg-editor",
50
+ "korean",
51
+ "language"
52
+ ],
53
+ "author": "Lovefields <lovefield@dico.me> (https://dico.me)",
54
+ "bugs": {
55
+ "url": "https://github.com/lovefields/dragonEditor/issues"
56
+ },
57
+ "homepage": "https://github.com/lovefields/dragonEditor#readme"
58
+ }