Closed ghost closed 7 years ago
@luisafonsocarvalho can you provide some screenshot? I never try to embed markdown editor on modal, but i think it will be common case for people to do so. I'll find out if its an easy fix.
There you go.
The markup for the modal is the following (i'm omitting the other divs the bootstrap modal requires for clarity):
<div class="modal-body" id="post-body">
<form class="form-horizontal" role="form" id="pub-form">
<div class="form-group">
<label for="title" class="col-md-2 control-label">Título</label>
<div class="col-md-10">
<input name="title" type="text" class="form-control"id="edit-title" value=$node->title>
</div>
</div>
<div class="form-group">
<label for="edit-body" class="col-md-2 control-label">Corpo</label>
<div class="col-md-10">
<textarea id="edit-body" class="form-control">$node->body</textarea>
</div>
</div>
</form>
</div>
+1
+1
+1
+1
+1
Okay I'm afraid there is no "official" fix for this within the plugin. The .modal-dialog
is containing the .md-editor.md-fullscreen-mode
block. If only css has a "parent selector" then this would be much easier :(
However, onFullscreen
and onFullscreenExit
events are the workaround to fix this issue. Modify modal-dialog
css via js on the fly. onFullscreen
event, turn it into:
.modal-dialog {
width: 100%;
height: 100%;
margin: 0;
}
then remove them on fullscreen end
If the editor is placed inside a bootstrap modal, the fulscreen doesn't open successfully.