jodit icon indicating copy to clipboard operation
jodit copied to clipboard

OEM version lineheight

Open olivierSOW opened this issue 10 months ago • 3 comments

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 avatar Apr 23 '24 14:04 olivierSOW

@olivierSOW I ran into the same issue but solved it by importing the line-height plugin at the top of the file.

AnnieOhlen avatar Apr 25 '24 11:04 AnnieOhlen

hi, thank you for you reply, how do importing the line-height pulgin ? via extraplugin parameter ?

olivierSOW avatar Apr 25 '24 12:04 olivierSOW

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?

xdan avatar May 11 '24 20:05 xdan