tui-nuxt / editor Goto Github PK
View Code? Open in Web Editor NEWππ TOAST UI Editor for Nuxt.JS
Home Page: https://www.npmjs.com/package/@tui-nuxt/editor
License: MIT License
ππ TOAST UI Editor for Nuxt.JS
Home Page: https://www.npmjs.com/package/@tui-nuxt/editor
License: MIT License
Using UI editor for nuxt, I like to know how I can do:
1- open a dialog and browse server files and folders? is it possible?
2- Upload file to server and receive back url and place it inside the editor? is it possible?
If possible, is there any help link or document on how to?
Thank you
Nuxt 2.8.1
run nuxt
edit nuxt.config.js
save
gives error:
Cannot read property 'codemirror' of undefined
at ModuleContainer.setTuiEditor (/projerct/node_modules/@tui-nuxt/editor/src/index.js:66:26) at ModuleContainer.addModule (/projerct/node_modules/@nuxt/core/dist/core.js:189:34) at promise.then (/projerct/node_modules/@nuxt/utils/dist/utils.js:1796:43)
Nuxt 2.8.1 with @tui-nuxt/editor and nuxt-jsonld gives an error
TypeError: Cannot read property 'find' of undefined at VueComponent.editorOptions (editor.client.js:15)
in file editor.client.js
-> language: this.$metaInfo.meta.find(e => e.hid === 'og:locale').content || 'en_US'
μ΄λ―Έμ§ μ
λ‘λλ₯Ό μν΄ graphqlμ μ¬μ©νλ μ½λ°±μ ꡬννκ³ μ νλλ°,
μ΄λ»κ² μ¬μ©ν μ μλμ§ μ μ μμκΉμ?
tui.editorμ μ΅μ νλͺ©μ nuxt.config.jsμμ λ³κ²½ν μ μλλ‘ μμ
Thank you for development this project. π
I found one bug, about importing js file.
when setting exts
in nuxt.config.js
,
//..
tui: {
editor: {
stylesheet: {
contents: '~/assets/css/custom-tui-content.css',
codeHighlight: '~/assets/css/custom-highlight.css',
},
exts : ['uml', 'chart', 'table']
}
}
//..
after build, look at the following file
.next/tui/editor.client.js
///...
import('tui-editor/dist/tui-editor-extuml')
import('tui-editor/dist/tui-editor-extchart')
import('tui-editor/dist/tui-editor-exttable')
///...
The file name is imported in lowercase
.
The real file name is
tui-editor-extChart.js
tui-editor-extTable.js
tui-editor-extUML.js
so, i ran build, have the following bug.
Module not found: Error: Can't resolve 'tui-editor/dist/tui-editor-extchart'
Module not found: Error: Can't resolve 'tui-editor/dist/tui-editor-exttable'
Module not found: Error: Can't resolve 'tui-editor/dist/tui-editor-extuml'
@firefanda
HI. I use @tui-nuxt/editor
But chat not working in nuxtjs.
what settings is mistake?
Version:
1.0.0-alpha.4
nuxt.config.js
tui: {
editor: {
exts: ['colorSyntax','scrollSync', 'chart', 'table', 'uml'],
stylesheet: {
editor: 'tui-editor/dist/tui-editor.min.css',
contents: 'tui-editor/dist/tui-editor-contents.min.css',
codemirror: 'codemirror/lib/codemirror.css',
codeHighlight: 'highlight.js/styles/github.css',
colorPicker: 'tui-color-picker/dist/tui-color-picker.min.css'
}
}
},
and editor.vue
<template>
<TuiEditor
v-model="editorText"
mode="markdown"
preview-style="vertical"
height="500px"
:options="editorOptions"
/>
</template>
data() {
return {
editorText: '# This is Viewer.\n Hello World.',
editorOptions: {
useCommandShortcut: true,
usageStatistics: false,
exts: [
{
name: 'chart',
minWidth: 100,
maxWidth: 600,
minHeight: 100,
maxHeight: 300
},
'scrollSync',
'colorSyntax',
'uml',
'mark',
'table'
]
}
}
},
nuxt.config.js
typingA declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.