Skip to content

replace resizable by css resize #276

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 7 additions & 31 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,15 @@ on:
# https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django
jobs:
build:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest

strategy:
matrix:
os: [ macos-latest, ubuntu-latest ]
python-version: [ 3.9, "3.10" ]
django-version: [ 3.2, 4.0, 4.1, 4.2 ]
python-version: [ "3.10", "3.11", "3.12" , "3.13"]
django-version: [ "5.0", "5.1" ]
include:
- os: macos-latest
python-version: "3.8"
django-version: "3.2"
- os: ubuntu-latest
python-version: "3.8"
django-version: "3.2"
- os: macos-latest
python-version: "3.8"
django-version: "4.0"
- os: ubuntu-latest
python-version: "3.8"
django-version: "4.0"
- os: macos-latest
python-version: "3.10"
django-version: "5.0"
- os: ubuntu-latest
python-version: "3.10"
django-version: "5.0"
- os: macos-latest
python-version: "3.10"
django-version: "5.0.3"
- os: ubuntu-latest
python-version: "3.10"
django-version: "5.0.3"

- python-version: "3.9"
django-version: "4.2"
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -55,8 +31,8 @@ jobs:

- name: Install dependencies
run: |
pip install -q Django==${{ matrix.django-version }}
python -m pip install --upgrade pip
pip install -U pip setuptools
pip install -q django==${{ matrix.django-version }}
python setup.py install

- name: Test with pytest
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ Different with *Template Renderer*, the *Template Editor Form* have more css & j

{% block css %}
<link href="{% static 'plugins/css/ace.min.css' %}" type="text/css" media="all" rel="stylesheet" />
<link href="{% static 'plugins/css/resizable.min.css' %}" type="text/css" media="all" rel="stylesheet" />
<link href="{% static 'martor/css/martor.bootstrap.min.css' %}" type="text/css" media="all" rel="stylesheet" />
{% endblock %}

Expand Down Expand Up @@ -328,7 +327,6 @@ Different with *Template Renderer*, the *Template Editor Form* have more css & j
<script type="text/javascript" src="{% static 'plugins/js/typo.js' %}"></script>
<script type="text/javascript" src="{% static 'plugins/js/spellcheck.js' %}"></script>
<script type="text/javascript" src="{% static 'plugins/js/highlight.min.js' %}"></script>
<script type="text/javascript" src="{% static 'plugins/js/resizable.min.js' %}"></script>
<script type="text/javascript" src="{% static 'plugins/js/emojis.min.js' %}"></script>
<script type="text/javascript" src="{% static 'martor/js/martor.bootstrap.min.js' %}"></script>
{% endblock %}
Expand Down
5 changes: 5 additions & 0 deletions martor/static/martor/css/martor-admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ fieldset .form-row .main-martor {
display: revert;
}

/* fix issue: #270 */
table {
caption-side: top;
}

/* fix issue: #168 */
@media (prefers-color-scheme: dark) {
body {
Expand Down
4 changes: 4 additions & 0 deletions martor/static/martor/css/martor-admin.min.css
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ fieldset .form-row .main-martor {
display: revert
}

table {
caption-side: top;
}

@media (prefers-color-scheme:dark) {
body {
color: #fff;
Expand Down
3 changes: 3 additions & 0 deletions martor/static/martor/css/martor.bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ body.overflow {
width: 100%;
height: 250px;
min-height: 100px;
resize: vertical;
border-right: 1px solid rgb(204, 204, 204);
border-bottom: 1px solid rgb(204, 204, 204);
}
.main-martor {
margin: 1em 0;
Expand Down
5 changes: 4 additions & 1 deletion martor/static/martor/css/martor.bootstrap.min.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ body.overflow {
.martor-field {
width: 100%;
height: 250px;
min-height: 100px
min-height: 100px;
resize: vertical;
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc
}

.main-martor {
Expand Down
3 changes: 3 additions & 0 deletions martor/static/martor/css/martor.semantic.css
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ div.martor-preview pre tt{margin:0;padding:0;background-color:transparent;border
width: 100%;
height: 250px;
min-height: 100px;
resize: vertical;
border-right: 1px solid rgb(204, 204, 204);
border-bottom: 1px solid rgb(204, 204, 204);
}

div.martor-preview {
Expand Down
8 changes: 6 additions & 2 deletions martor/static/martor/css/martor.semantic.min.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ body.overflow {
}

.martor-toolbar {
padding: 0 0.85714286em !important4px !important !important
padding: 0 0.85714286em !important;
padding-bottom: 4px!important
}

.martor-toolbar .ui.icon .markdown-image-upload {
Expand Down Expand Up @@ -499,7 +500,10 @@ div.martor-preview pre tt {
.martor-field {
width: 100%;
height: 250px;
min-height: 100px
min-height: 100px;
resize: vertical;
border-right: 1px solid rgb(204, 204, 204);
border-bottom: 1px solid rgb(204, 204, 204)
}

div.martor-preview {
Expand Down
8 changes: 0 additions & 8 deletions martor/static/martor/js/martor.bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,6 @@
textareaId.val(value);
});

// resize the editor using `resizable.min.js`
$('#' + editorId).resizable({
direction: 'bottom',
stop: function () {
editor.resize();
}
});

// update the preview if this menu is clicked
var currentTab = $('.tab-pane#nav-preview-' + field_name);
var editorTabButton = $('.nav-link#nav-editor-tab-' + field_name);
Expand Down
2 changes: 1 addition & 1 deletion martor/static/martor/js/martor.bootstrap.min.js

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions martor/static/martor/js/martor.semantic.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,6 @@
textareaId.val(value);
});

// resize the editor using `resizable.min.js`
$('#' + editorId).resizable({
direction: 'bottom',
stop: function () {
editor.resize();
}
});

// update the preview if this menu is clicked
var currentTab = $('.tab.segment[data-tab=preview-tab-' + field_name + ']');
var previewTabButton = $('.item[data-tab=preview-tab-' + field_name + ']');
Expand Down
Loading