Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-vue-admin
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-vue-admin
Commits
8a98225c
提交
8a98225c
authored
10月 26, 2020
作者:
vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore(tinymec): remove lineHeight
上级
2be166d6
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
49 行增加
和
48 行删除
+49
-48
Editor.vue
src/components/Tinymce/src/Editor.vue
+3
-3
lineHeight.js
src/components/Tinymce/src/lineHeight.js
+0
-44
lineHeight.ts
src/components/Tinymce/src/lineHeight.ts
+45
-0
plugins.ts
src/components/Tinymce/src/plugins.ts
+1
-1
没有找到文件。
src/components/Tinymce/src/Editor.vue
浏览文件 @
8a98225c
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
import
{
useScript
}
from
'/@/hooks/web/useScript'
;
import
{
useScript
}
from
'/@/hooks/web/useScript'
;
import
{
snowUuid
}
from
'/@/utils/uuid'
;
import
{
snowUuid
}
from
'/@/utils/uuid'
;
import
{
bindHandlers
}
from
'./helper'
;
import
{
bindHandlers
}
from
'./helper'
;
import
L
ineHeight
from
'./lineHeight'
;
// import l
ineHeight from './lineHeight';
const
CDN_URL
=
'https://cdn.bootcdn.net/ajax/libs/tinymce/5.5.1'
;
const
CDN_URL
=
'https://cdn.bootcdn.net/ajax/libs/tinymce/5.5.1'
;
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
advlist_number_styles
:
'default'
,
advlist_number_styles
:
'default'
,
object_resizing
:
false
,
object_resizing
:
false
,
fontsize_formats
:
'10px 11px 12px 14px 16px 18px 20px 24px 36px 48px'
,
fontsize_formats
:
'10px 11px 12px 14px 16px 18px 20px 24px 36px 48px'
,
lineheight_formats
:
"1 1.5 1.75 2.0 3.0 4.0 5.0"
,
lineheight_formats
:
'1 1.5 1.75 2.0 3.0 4.0 5.0'
,
...
options
,
...
options
,
setup
:
(
editor
:
any
)
=>
{
setup
:
(
editor
:
any
)
=>
{
editorRef
.
value
=
editor
;
editorRef
.
value
=
editor
;
...
@@ -120,7 +120,7 @@
...
@@ -120,7 +120,7 @@
}
}
function
initEditor
()
{
function
initEditor
()
{
getTinymce
().
PluginManager
.
add
(
'lineHeight'
,
L
ineHeight
(
getTinymce
()));
// getTinymce().PluginManager.add('lineHeight', l
ineHeight(getTinymce()));
getTinymce
().
init
(
unref
(
initOptions
));
getTinymce
().
init
(
unref
(
initOptions
));
}
}
...
...
src/components/Tinymce/src/lineHeight.js
deleted
100644 → 0
浏览文件 @
2be166d6
const
LineHeight
=
function
(
e
)
{
e
.
PluginManager
.
add
(
'lineheight'
,
function
(
t
,
n
,
r
)
{
t
.
on
(
'init'
,
function
()
{
t
.
formatter
.
register
({
lineheight
:
{
inline
:
'span'
,
styles
:
{
'line-height'
:
'%value'
,
},
},
});
});
t
.
ui
.
registry
.
addMenuButton
(
'lineheight'
,
{
icon
:
'lineheight'
,
tooltip
:
'设置行高'
,
fetch
:
function
(
callback
)
{
var
dom
=
t
.
dom
;
var
blocks
=
t
.
selection
.
getSelectedBlocks
();
var
lhv
=
0
;
global
$1
.
each
(
blocks
,
function
(
block
)
{
if
(
lhv
==
0
)
{
lhv
=
dom
.
getStyle
(
block
,
'line-height'
)
?
dom
.
getStyle
(
block
,
'line-height'
)
:
0
;
}
});
var
items
=
lineheight_val
.
split
(
' '
).
map
(
function
(
item
)
{
var
text
=
item
;
var
value
=
item
;
return
{
type
:
'togglemenuitem'
,
text
:
text
,
active
:
lhv
==
value
?
true
:
false
,
onAction
:
function
()
{
doAct
(
value
);
},
};
});
callback
(
items
);
},
});
});
e
.
PluginManager
.
requireLangPack
(
'lineheight'
,
'de'
);
};
export
default
LineHeight
;
src/components/Tinymce/src/lineHeight.ts
0 → 100644
浏览文件 @
8a98225c
const
lineHeight
=
function
(
tinymce
:
any
)
{
tinymce
.
PluginManager
.
add
(
'lineheight'
,
function
(
t
:
any
)
{
t
.
on
(
'init'
,
function
()
{
t
.
formatter
.
register
({
lineheight
:
{
inline
:
'span'
,
styles
:
{
'line-height'
:
'%value'
,
},
},
});
});
t
.
ui
.
registry
.
addMenuButton
(
'lineheight'
,
{
icon
:
'lineheight'
,
tooltip
:
'设置行高'
,
// fetch: function (callback: Fn) {
// var dom = t.dom;
// var blocks = t.selection.getSelectedBlocks();
// var lhv = 0;
// global$1.each(blocks, function (block: any) {
// if (lhv == 0) {
// lhv = dom.getStyle(block, 'line-height') ? dom.getStyle(block, 'line-height') : 0;
// }
// });
// var items = lineheight_val.split(' ').map(function (item) {
// var text = item;
// var value = item;
// return {
// type: 'togglemenuitem',
// text: text,
// active: lhv == value ? true : false,
// onAction: function () {
// doAct(value);
// },
// };
// });
// callback(items);
// },
});
});
tinymce
.
PluginManager
.
requireLangPack
(
'lineheight'
,
'de'
);
};
export
default
lineHeight
;
src/components/Tinymce/src/plugins.ts
浏览文件 @
8a98225c
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
// colorpicker/contextmenu/textcolor plugin is now built in to the core editor, please remove it from your editor configuration
// colorpicker/contextmenu/textcolor plugin is now built in to the core editor, please remove it from your editor configuration
const
plugins
=
[
const
plugins
=
[
'advlist anchor autolink autosave code codesample directionality emoticons fullscreen hr image imagetools insertdatetime link lists media nonbreaking noneditable pagebreak paste preview print save searchreplace spellchecker tabfocus table template textpattern visualblocks visualchars wordcount'
,
'
lineheight
advlist anchor autolink autosave code codesample directionality emoticons fullscreen hr image imagetools insertdatetime link lists media nonbreaking noneditable pagebreak paste preview print save searchreplace spellchecker tabfocus table template textpattern visualblocks visualchars wordcount'
,
];
];
export
default
plugins
;
export
default
plugins
;
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论