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

I want to add some features to the "Image Attributes" edit page #115

Open
Ademgenc53 opened this issue Jul 22, 2020 · 2 comments
Open

I want to add some features to the "Image Attributes" edit page #115

Ademgenc53 opened this issue Jul 22, 2020 · 2 comments

Comments

@Ademgenc53
Copy link

Ademgenc53 commented Jul 22, 2020

Hello,
With trial and error,
I added the image width feature works fine
I added image align feature works fine

I added image padding feature works fine

But,
I want to add
padding-top,
padding-right,
padding-bottom,
padding-left,
instead of padding

I couldn't, I wonder where I'm doing wrong
Screen: https://antenfiyati.com/padding.png

					})).append($('<label/>',{ for:"imgPaddingTop_txtEditor", text:"Resmin Üst kenar boşluğu (padding-top)"}
					)).append($('<input/>',{
						id:"imgPaddingTop",
						class:"form-control form-control-width",
						type:"text",
						placeholder:"padding-top",
					})).append($('<label/>',{ for:"imgPaddingRight_txtEditor", text:"Resmin Üst kenar boşluğu (padding-right)"}
					)).append($('<input/>',{
						id:"imgPaddingRight",
						class:"form-control form-control-width",
						type:"text",
						placeholder:"padding-right",
					})).append($('<label/>',{ for:"imgPaddingBottom_txtEditor", text:"Resmin Alt kenar boşluğu (padding-bottom)"}
					)).append($('<input/>',{
						id:"imgPaddingBottom",
						class:"form-control form-control-width",
						type:"text",
						placeholder:"padding-bottom",
					})).append($('<label/>',{ for:"imgPaddingLeft_txtEditor", text:"Resmin Sol kenar boşluğu (padding-left)"}
					)).append($('<input/>',{
						id:"imgPaddingLeft",
						class:"form-control form-control-width",
						type:"text",
						placeholder:"padding-left"
```


```
     			       var imagePaddingTop = $('#imgPaddingTop').val();
				var imagePaddingRight = $('#imgPaddingRight').val();
				var imagePaddingBottom = $('#imgPaddingBottom').val();
				var imagePaddingLeft = $('#imgPaddingLeft').val();
```

```
						if(imagePaddingTop!="")
						{
							$("#"+imgId).css('padding-top',imagePaddingTop);
						}
						else
						{
							$("#"+imgId).css('padding-top','');
						}

						if(imagePaddingRight!="")
						{
							$("#"+imgId).css('padding-right',imagePaddingRight);
						}
						else
						{
							$("#"+imgId).css('padding-right','');
						}

						if(imagePaddingBottom!="")
						{
							$("#"+imgId).css('padding-bottom',imagePaddingBottom);
						}
						else
						{
							$("#"+imgId).css('padding-bottom','');
						}

						if(imagePaddingLeft!="")
						{
							$("#"+imgId).css('padding-left',imagePaddingLeft);
						}
						else
						{
							$("#"+imgId).css('padding-left','');
						}
```


```
				       $('#imgPaddingTop').val( $(e.target).closest("img").get(0).style.paddingTop );

					$('#imgPaddingRight').val( $(e.target).closest("img").get(0).style.paddingRight );

					$('#imgPaddingBottom').val( $(e.target).closest("img").get(0).style.paddingBottom );

					$('#imgPaddingLeft').val( $(e.target).closest("img").get(0).style.paddingLeft );
```
@nmohanan
Copy link
Contributor

nmohanan commented Jul 22, 2020 via email

@Ademgenc53
Copy link
Author

Thank you
I'm trying to do something amateur for myself

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

2 participants