当前位置: 首页 > 工具软件 > KityFormula > 使用案例 >

在ueditor富文本编辑器和 kityformula公式插件

盖博简
2023-12-01

在ueditor富文本编辑器中添加 kityformula公式插件

1、首先引入js

<script src="/static/js/ueditor/kityformula-plugin/addKityFormulaDialog.js?v=' + versions + '" charset="utf-8"></\script>
<script src="/static/js/ueditor/kityformula-plugin/getKfContent.js?v=' + versions + '" charset="utf-8"></\script>')
<script src="/static/js/ueditor/kityformula-plugin/defaultFilterFix.js?v=' + versions + '" charset="utf-8"></\script>

2、同时在最下面实例化编辑器

//富文本编辑器文件配置
var options={
	serverUrl:baseUrl + 'core/upload/ueditor?type=40&schid=' +JSON.parse(sessionStorage.getItem("userMsg")).schid,
	toolbars: [['fullscreen', 'bold',  'italic', 'underline', 'waveline', 'dots', 'removeformat', 'insertimage', 'complexformulas']],
	autoHeightEnabled: false,
	autoFloatEnabled: false,
	autoClearinitialContent: true,
	initialFrameWidth: 800,
	initialFrameHeight: 100,
	elementPathEnabled : false ,
	wordCount:false,
	BaseUrl: '',
  zIndex: '100',
  retainOnlyLabelPasted: true,
  pasteplain: true,
};
 类似资料: