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

Opening editor to the width of <div> #29

Closed
theced7 opened this issue Aug 21, 2016 · 2 comments
Closed

Opening editor to the width of <div> #29

theced7 opened this issue Aug 21, 2016 · 2 comments

Comments

@theced7
Copy link

theced7 commented Aug 21, 2016

Hi,

first of all: Thank you very much for this great django package! I was desperately searching for a decent editor and this just blew all of my expectations out of the water!

One small thing though:
markdownx

Is it possible to aviod that gap i.e. to extend the editor's width?

I'm using this very basic template from the readme, basically the editor should just be as wide as the

container:

<div class="markdownx row">
<div class="col-md-6">
    {{ markdownx_editor }}
</div>
<div class="col-md-6">
<div class="markdownx-preview"></div>
</div>
</div>
~

I'm using MarkdownxFormField() within a ModelForm.

On a sidenote: The editor is not resizeable at all (i.e. by drag the frame). Is that an issue on my side?

@adi-
Copy link
Member

adi- commented Aug 21, 2016

Thanks!

The problem you describe is simply fixable. You need to use proper styling. Just take a look at:

<div class="col-md-6">
    {{ markdownx_editor }}
</div>

{{ markdownx_editor }} will return <textarea> which should be styled as:

textarea {
  width: 100%;
}

On a sidenote: The editor is not resizeable at all (i.e. by drag the frame). Is that an issue on my side?

No, just set:

textarea {
  resize:both;
}

More at www.w3schools.com/cssref/css3_pr_resize.asp

@theced7
Copy link
Author

theced7 commented Aug 21, 2016

Ha! Thank you very much! I'm not at all familiar with CSS, so that was a big help!

@theced7 theced7 closed this as completed Aug 21, 2016
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