jodit
jodit copied to clipboard
OEM version lineheight
BUGS: lineHeight button with OEM version doesn't work. button's text is not replace by image. Jodit Version OEM: 1.0.17
Code
IHMConf.transcriptionControl= Jodit.make('#transcription', {
license: 'xxxxxxxxxx'
,controls: {
font: {list: {
'Noto,Arial,sans-serif': 'Noto'
, 'Overpass,Arial,sans-serif':'Overpass'
}}
//,lineHeight: {list: Jodit.atom([1, 2, 3, 3.5])}
,paragraph: {
//icon:'headerIcon'
list: Jodit.atom({
p: 'Normal',
h1: 'Heading 1',
h2: 'Heading 2',
h3: 'Heading 3',
h4: 'Heading 4',
h5: 'Heading 5',
h6: 'Heading 6',
})
}
}
,extraPlugins:['changeCase']
,buttons: ['bold', 'italic', 'superscript', 'font', 'fontsize', 'brush', 'paste', 'copyformat', '|', 'paragraph', 'changeCase', 'outdent', 'indent'/*,'classSpan'*/, 'lineHeight', 'ul','ol', /*'pageBreak',*/ 'undo', 'redo'
,{
name: 'nbsp'
,icon: 'nbspIcon'
,hotkeys:"SHIFT+6" ///todo
,tooltip: 'Insert Non Breakable space'
,exec: (editor) => {editor.s.insertHTML(" ");}
}
,{
name: 'hyphen'
,icon: 'hyphenIcon'
,tooltip: 'Insert hyphen'
,exec: (editor) => {editor.s.insertHTML("‐");}
}
,'symbol'
,'eraser'
]//buttons
,hotkeys:{eraser:'ctrl+shift+z'} ///todo
,style:"Noto"
,enter:"P"
,enableDragAndDropFileToEditor:false
,cleanHTML:{replaceNBSP:false, denyTags:"script"}
,askBeforePasteFromWord:true
,hidePoweredByJodit:true
,events:{
change:()=>{IHMConf.OnDataChanged()}///todo
}
});
Expected behavior: button "line height" in toolbar which control the line height of selected paragraph
Actual behavior: button "line height" appears but has no effect. If i uncomment //,lineHeight: {list: Jodit.atom([1, 2, 3, 3.5])}
, clicking button shows values but nothing happen when clicking one value
@olivierSOW I ran into the same issue but solved it by importing the line-height plugin at the top of the file.
hi, thank you for you reply, how do importing the line-height pulgin ? via extraplugin parameter ?
Hello, did you solve the problem? We have an autotest for creating custom elements for lineheight and it works. Are you using the ESM build?