Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OEM version lineheight #1115

Closed
olivierSOW opened this issue Apr 23, 2024 · 3 comments
Closed

OEM version lineheight #1115

olivierSOW opened this issue Apr 23, 2024 · 3 comments

Comments

@olivierSOW
Copy link

olivierSOW commented Apr 23, 2024

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

@AnnieOhlen
Copy link

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

@olivierSOW
Copy link
Author

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

@xdan
Copy link
Owner

xdan commented May 11, 2024

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 xdan closed this as completed May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants