<style>
    .name {
        margin-top: 20px !important;
        margin-right: 30px !important;
        margin-left: 30px !important;
    }
</style>
<div id="addArticleModal" class="modal fade" role="dialog">
    <div class="modal-dialog modal-lg" style="max-width: 1050px!important;">

        <!-- Modal content-->
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">Add Article</h4>
            </div>

            <form method="post" enctype="multipart/form-data" action="published_article.php">
                <div class="modal-body">

                    <div class="form-group my_form">
                        <label for="email">Title:</label>
                        <input type="text" class="form-control" name="title">
                    </div>

                    <div class="form-group my_form">
                        <label for="email">Category:</label>
                        <select class="form-control" name="category">
                            <?php
                            $categories = $db->getDropCategories();
                            while ($category = $categories->fetch_assoc()) : ?>
                                <option value="<?php echo $category['id']; ?>">
                                    <?php echo $category['name']; ?>
                                </option>
                            <?php endwhile; ?>
                        </select>
                    </div>

                    <div class="form-group my_form">
                        <label for="email">Status:</label>
                        <select class="form-control" name="status">
                            <option value="published">Published</option>
                            <option value="inactive">Inactive</option>
                        </select>
                    </div>

                    <div class="form-group my_form">
                        <label for="email">Author:</label>
                        <input type="text" class="form-control" name="author_id">
                    </div>

                    <div class="form-group my_form">
                        <label>Content:</label>
                        <textarea name="story" id="mytextarea"></textarea>
                    </div>

                    <!-- <div id="froala-editor" class="form-group my_form">
                         <label>Content:</label>
                         <textarea name="story"></textarea>
                     </div>
 -->
                    <div class="form-group" style="margin-top: 20px!important;">
                        <label for="exampleFormControlFile1">Upload Photo</label>
                        <input type="file" class="form-control-file" name="post_photo">
                    </div>

                </div>
                <div class="modal-footer">
                    <button type="submit" name="submit_art" class="btn btn-info">Submit</button>
                </div>
            </form>
        </div>

    </div>
</div>

<script>
    $('#addArticleModal').on('shown.bs.modal', function () {
        $(document).off('focusin.modal');
    });

    $('.the-modal').bind('shown', function() {
        $('textarea.tinymce-modal').tinymce({
            // TinyMCE Options
        });
    });

</script>