Topic: Set table width in ModelEditor
How can I set the table width in ModelEditor. In other tables it works. I cannot find out how to set in ModelEditor.
Mateusz Łubianka staff answered 5 years ago
Hi @Hoteentot,
How did you try to do it? Can you sen a sample of code? I'll try to help you?
Best,
Hoteentot commented 5 years ago
$('#dtBasicExample, #dtBasicExample-1, #dt-more-columns, #dt-less-columns').mdbEditor({ headerLength: 24, scrollX: true, scrollY: true, modalEditor: true }); $('.dataTables_length').addClass('bs-select');
Hoteentot answered 5 years ago
<script>
$('#dtBasicExample, #dtBasicExample-1, #dt-more-columns, #dt-less-columns').mdbEditor({
headerLength: 24,
scrollX: true,
scrollY: true,
modalEditor: true
});
$('.dataTables_length').addClass('bs-select');
</script>
Mateusz Łubianka staff commented 5 years ago
Ok, I can see your problem. I check it and answer you soon.
Best,
Hoteentot commented 5 years ago
Did you already find an solution for above problem?
Mateusz Łubianka staff commented 5 years ago
Do you want only to set table width? Am I right?
Best,
Hoteentot commented 5 years ago
Yes indeed, it would be great!
Mateusz Łubianka staff answered 5 years ago
You can change table width via css style or jQuery.
*CSS
.wrapper-editor {width: 300px;}
*jQuery
$('.wrapper-editor').css('width', '300px');
Best,
Hoteentot commented 5 years ago
Thanks, but is not what I meant. In dtHorizontalExample you can set scrollX = true. How Can I set This in ModalEditor. When I try in ModalEditor ScrollX = true, notting happens
Mateusz Łubianka staff answered 5 years ago
I am sorry for the misunderstanding. Unfortunately there isn't built-in scrollX option in mdb-editor code. You can set table width and use this css:
overflow-x: scroll;
Best,
Hoteentot commented 5 years ago
I''m sorry, don 't work. May be a additional for next version update
Mateusz Łubianka staff commented 5 years ago
You should add custom width and after that 'overflow-x: scroll; '
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Free
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.8.11
- Device: laptop
- Browser: firefox
- OS: windows 7
- Provided sample code: No
- Provided link: No