html可视化数学公式编辑,所见即所得的jQuery数学公式编辑器插件

MathquillBasedEditor是一款所见即所得的jQuery数学公式编辑器插件。该数学公式编辑器依赖于mathquill,可以通过点击图标来直接生成乘方和开方等数学公式。

使用方法

在页面中引入mathquill和matheditor的相关文件。

HTML结构

使用一个

作为公式编辑器的容器。

初始化插件

可以通过下面的方法来实例化MathEditor对象。

var mathEditor = new MathEditor('some_id');

mathEditor.buttons(["fraction","square_root","cube_root","root",'superscript','subscript']);

// If you dont write this line editor will display default buttons.

mathEditor.removeButtons(["fraction","square_root"])

// If you want to remove some buttons from default list.

mathEditor.styleMe({

width: '500',

height: '80'

});

// List of other options are mentioned bellow.

mathEditor.setTemplate('keypad');

// It will make button toolbar look like keypad.

// More options would be added.

mathEditor.getValue();

// It will return letex for input formula.

配置参数

在styleMe()方法中可用的配置参数如下:

参数

类型

默认值

描述

width

string

500

编辑器的最小宽度。

height

string

40

编辑器的最小高度。

textarea_background

string

#FFFFFF

编辑器文本区域的背景颜色。

textarea_foreground

string

#000000

编辑器文本区域的前景颜色。

textarea_border

string

#000000

编辑器文本区域的边框颜色。

toolbar_background

string

#FFFFFF

编辑器工具栏的背景颜色。

toolbar_foreground

string

#000000

编辑器工具栏的文本颜色。

toolbar_border

string

#000000

编辑器工具栏的边框颜色。

button_background

string

#FFFFFF

编辑器工具栏按钮的背景颜色。

button_border

string

#000000

编辑器工具栏按钮的边框颜色。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值