Comments (4)
你好,1.4.2 版本已经完成此需求。
我为每个自定义图表(echarts、kanban、markmap)添加了一个 【INTERACTIVE_MODE】 配置。处于交互模式下,将无法编辑。
退出交互模式有两种方法:
- 点击 edit icon(默认开启)
- ctrl+click(默认关闭)
分别对应两个配置【CLICK_EDIT_BUTTON_TO_EXIT_INTERACTIVE_MODE】【CTRL_CLICK_TO_EXIST_INTERACTIVE_MODE】
注意:如果你使用了自定义图表(kanban、markmap、echarts),那么这两个配置请至少一个置为true,否则你将不能退出交互模式,修改fence(当然,你可以通过进入源码模式修改)
from typora_plugin.
尝试了新版,效果杠杠滴。新的需求又来啦,有时候想使得echarts图表全屏,一个方法是在toolbox中添加一个按钮,添加点击事件,使得全屏。在HTML中能知道DOM元素比较好设置,请教一下在typora中如何获取echarts图表的DOM元素呢?以及如何获取echarts图表示例在全屏后执行resize()呢?感谢!
from typora_plugin.
- 获取 echarts 的 dom 元素:
myChart._dom
- 获取预览图表的div:
myChart._dom.closest(".md-diagram-panel-preview")
- 获取全屏div:
document.querySelector("content")
所以 resize 的代码类似于
// 我没试过,可能还要修改previewer的其他CSS
myChart.on('click', params => {
// 获取全屏的大小
const {width, left, top, height} = document.querySelector("content").getBoundingClientRect();
// 获取previewer
const previewer = myChart._dom.closest(".md-diagram-panel-preview");
previewer.style.width = width + "px";
previewer.style.left = left + "px";
previewer.style.top = top + "px";
previewer.style.height = height + "px";
myChart.resize();
});
from typora_plugin.
有两个 echarts 相关的 issue,不好管理,关闭这个。如有问题,请移步到 这个issue 继续讨论
from typora_plugin.
Related Issues (20)
- 上传文章到CSDN,提示开始上传后就没动静了,实际上未上传成功 HOT 6
- 希望添加一款大纲目录插件 HOT 5
- 按钮和更新功能异常 HOT 8
- callouts问题 HOT 3
- 资源管理插件不应该把.gitignore文件也放入 HOT 3
- window_tab 问题-切换tab页时内容没有切换 HOT 4
- 可否开发一个微信公众号文章一键复制功能插件 HOT 1
- 能否支持wavedrom HOT 5
- 标题序号问题 HOT 2
- 折叠代码是否能有记忆功能? HOT 1
- 想要一份主题CSS样式,我的主题很混乱 HOT 2
- [features request]图片标题显示(类似word中的题注功能) HOT 5
- 如何关闭` \ ` 自动出现标题提示 HOT 3
- 问题反馈:出现无法正常键入中文但是英文键入的情况。 HOT 7
- 是否可以在插件自动增加的图片序号中编辑相应的图片标题? HOT 13
- 为啥导出增强插件偶尔不见了? HOT 3
- 能添加自动补全功能吗(针对latex) HOT 2
- 找不到修改markdown格式警报的地方(软件内) HOT 2
- auto_number插件设置enable = false了还是还是会生效 HOT 3
- 能否提供typora代码块方案切换功能。 HOT 2
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 typora_plugin.