Comments (5)
To add the usage method, two new APIs are provided to open and close the text editor. To open, please call textEditorOpen
, and to close, please call textEditorClose
. Of course, the user can also click the button on the page to trigger the close. The following is an example of use:
onExecCmd(key, command, success, failed) {
// ... some logic
if (key === 'edit') {
Terminal.$api.textEditorOpen(this.name, {
content: 'Please edit this text file.',
onClose: value => {
success([
{
class: 'success',
content: "Edit saved successfully!"
},
{
type: 'code',
content: value
}
])
}
})
}
}
For more usage methods, please check the documentation:
from vue-web-terminal.
The text editor already supports custom styles, and it can be used after updating to version 2.1.3 or 3.1.3, and the effect can also be previewed in the online demo
from vue-web-terminal.
OK, actually, there were plans to do this feature, but it was delayed by the production of the Shell component, and I will support this feature in the next version as soon as possible.
from vue-web-terminal.
Already in 3.1.2 and 2.1.2 version supports this feature, thanks for your suggestion
from vue-web-terminal.
Wow, that was fast. Thanks! :)
from vue-web-terminal.
Related Issues (20)
- No way to customize autocomplete HOT 3
- clone后编译会直接报错 HOT 1
- 关于api设计的问题 HOT 2
- head support dbclick for fullscreen
- support Clipboard by right click
- export other function component
- Support rename HOT 4
- Multi instance dragging will only take effect for one instance HOT 2
- Support ANSI code filter HOT 2
- Remove the hump event name and change it to a dash name HOT 3
- vue3.0里使用报错 HOT 4
- 使用界面出现undefined,并且无法显示文字 HOT 12
- Make callbacks asynchronous HOT 3
- 窗口无法固定 HOT 3
- onKeydown事件在使用Flash时,失焦后失效 HOT 1
- 增加beforePush回调函数 HOT 3
- Show Header false not working. HOT 2
- ASCII码160 (NBSP)分割的命令行无法正常解析的问题 HOT 1
- 在type等于code模式下,回显带有xml标签信息时,xml标签没有正常显示,审查元素后发现xml标签被渲染成了dom元素。希望可以在code模式下正常显示xml标签信息 HOT 1
- 动态修改窗口大小 HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-web-terminal.