Closed danihodovic closed 5 years ago
Hey @danihodovic, thanks for reporting this.
I hadn’t heard of Ghosttext before, from what I can see on https://github.com/GhostText/GhostText/issues it has issues with various sites / types of editors / browsers. The README also states:
Notice: GhostText generally works but it has some bugs across the various implementations. If you use it regularly please consider contributing/bugfixing your editor's GhostText plugin.
I’d suggest you first open an issue with GhostText so they can help you figure out whether in your case this is a problem with your editor, browser, or Wagtail’s fields. I think maintainers of this project will be in a better position to understand how GhostText is meant to work and what might be breaking in this one instance. Then we can consider making adjustments to Wagtail’s fields to better support extensions like this.
I've used Ghosttext for Stackoverflow, Github and Hacker News fields and the only site I have problems with right now is Wagtail.
Sorry to hear that @danihodovic – if you can figure out what the problems are we’d be happy to consider fixes. Again, I think people involved with GhostText will be more likely to figure out what might be causing issues than maintainers of Wagtail.
I found a workaround in case someone stumbles on the same issue.
The problem seems to be in the Simple Markdown Editor that wagtailmarkdown uses. It blocks ghost from meddling with the text field.
The workaround I've found is to render normal TextFields in the editor interface which works with Ghost. Using the markdown
template tag from wagtailmarkdown still works with vanilla fields.
e.g
instead of
from wagtailmarkdown.fields import MarkdownField
class BlogPage(Page):
body = MarkdownField()
use
from django.db import models
class BlogPage(Page):
body = models.TextField()
and when rendering the markdown
{% load wagtailmarkdown %}
<div class="post-text">{{ page.body|markdown }}</div>
Found a bug? Please fill out the sections below. 👍
Issue Summary
I'm unable to edit Wagtail text fields with Ghosttext. It works with any other text field on any site I've tried so far, except for the Wagtail text fields.
I'm using
Steps to Reproduce
Technical details