Mezzanine--使用Markdown編輯-Pagedown

Posted by: Max Chen | in Mezzanine | 1 year, 11 months ago |

#14 Issue open: Mezzanine--使用Markdown編輯-Pagedown

Labels: Mezzanine

MaxwellBest opened issue at 2021-06-20 15:04:

依照Document的設定還是有遇到一些bug,以下是成功的run在prod的setting:

註:上prod時,記得要執行一次python manage.py collectstatic,否則markdown編輯器會跑不出來。

setting.py

```
INSTALLED_APPS = (
      # "flat",
      # "moderna",
    "solid",
    # "nova",
    "django.contrib.admin",
    "django.contrib.auth",
    "django.contrib.contenttypes",
    "django.contrib.redirects",
    "django.contrib.sessions",
    "django.contrib.sites",
    "django.contrib.sitemaps",
    "django.contrib.staticfiles",
    "mezzanine.boot",
    "mezzanine.conf",
    "mezzanine.core",
    "mezzanine.generic",
    "mezzanine.pages",
    "cartridge.shop",
    "mezzanine.blog",
    "mezzanine.forms",
    "mezzanine.galleries",
    "mezzanine.twitter",
    "mezzanine.accounts",
    "mezzanine_mailchimp",
    "mezzanine_pagedown",  ###添加app
    # "engineer",
)

# Mezzanine Pagedown Setting
RICHTEXT_WIDGET_CLASS = 'mezzanine_pagedown.widgets.PageDownWidget'
RICHTEXT_FILTER = 'mezzanine_pagedown.filters.plain'
RICHTEXT_FILTERS = (RICHTEXT_FILTER,)
PAGEDOWN_MARKDOWN_EXTENSIONS = ('extra','codehilite','toc')
RICHTEXT_FILTER_LEVEL = 3
# PAGEDOWN_USE_MEZZANINE_HTML_ESCAPE = True
PAGEDOWN_SERVER_SIDE_PREVIEW = True
```

url.py

```
import mezzanine_pagedown.urls

urlpatterns += [

        # Pagedown
        url("^pagedown/", include(mezzanine_pagedown.urls)),
]
```

image

Reference:

https://rodmtech.net/docs/mezzanine/a-mezzanine-tutorial-take-2/ https://github.com/mgaitan/mezzanine-pagedown

Currently unrated
 or 

Subscribe

* indicates required

Recent Posts

Archive

2023
2022
2021

Categories

Apache 1

Data Science 2

Dbfit 1

Design Pattern 1

Devops 4

DigitalOcean 1

Django 1

English 3

Excel 5

FUN 4

Flask 3

Git 1

HackMD 1

Heroku 1

Html/Css 1

Linux 4

MDX 1

Machine Learning 2

Manufacture 1

Master Data Service 1

Mezzanine 18

Oracle 1

Postgresql 7

PowerBI 4

Powershell 4

Python 22

SEO 2

SQL Server 53

SQL Server Analytics Service 1

SQLite 1

Windows 1

database 8

work-experience 1

其他 1

投資入門 1

投資心得 2

時間管理 1

總體經濟 2

自我成長 3

資料工程 1

Tags

SEO(1) Github(2) Title Tag(2) ML(1) 李宏毅(1) SQL Server(18) Tempdb(1) SSMS(1) Windows(1) 自我成長(2) Excel(1) python Flask(1) python(5) Flask(2)

Authors

Max Chen (159)

Feeds

RSS / Atom

Mezzanine--使用Markdown編輯-Pagedown

© COPYRIGHT 2011-2022. Max的文藝復興. ALL RIGHT RESERVED.