Giter Club home page Giter Club logo

django-markitup's People

Contributors

akinfold avatar aramgutang avatar berkerpeksag avatar carljm avatar evdb avatar geyser avatar ivanvenosdel avatar jezdez avatar kmike avatar phpdude avatar richleland avatar takeruwolf avatar vorushin avatar wunki avatar zsiciarz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

django-markitup's Issues

Textile set: link title and image alt text should be optional (alt-click)

Currently, in Textile mode, clicking on the link button prompts for a title, and clicking on the image button prompts for alt text. Both of these should be optional. The convention in other places is to define optional components so that they are only included when alt-clicking the toolbar button, that should be the case here.

Textile set blockquote definition is mangled

The blockquote definition for Textile says

openWith:'bq(!(([![Class]!])!)). '

The parentheses here are mismatched -- the string starts with (!(( so it should end with ))!) but instead it ends with )!)).

`value` in `pre_save` and `value_to_string` is str using factory-boy

I get this error when I want to test my code using factory-boy:

AttributeError: 'str' object has no attribute 'raw'. See also this question on stackoverflow.

Therefore I have to subclass the MarkupField:

from markitup.fields import render_func, _rendered_field_name

class MyMarkupField(MarkupField):
    def value_to_string(self, obj):
        value = self._get_val_from_obj(obj)
        if hasattr(value, "raw"):
            return value.raw
        return value

    def pre_save(self, model_instance, add):
        value = super(MarkupField, self).pre_save(model_instance, add)
        if hasattr(value, "raw"):
            value = value.raw
        elif value is None:
            value = ''
        rendered = render_func(value)
        setattr(model_instance, _rendered_field_name(self.attname), rendered)
        return value

This isn't ideal. Can we fix this, please?

when using django 2.2

MARKITUP_FILTER = ('django.contrib.markup.templatetags.markup.textile', {})
getting error
django.core.exceptions.ImproperlyConfigured: Could not import MARKITUP_FILTER ('django.contrib.markup.templatetags.markup.textile', {}): No module named 'django.contrib.markup'

Inline js makes it impossible to load form media js in page foot

For performance, it's usually recommended to render CSS in HTML head and JS in the foot of the page. That way only the CSS loading needs to happen before rendering the page, and the JS can execute once it is visible. (Assuming the page doesn't need the JS to complete to generate content).

Markitup's inline JS requires both jQuery and markitup to be loaded above the widget, in the page.

I would suggest rather having data attributes inline, and adding a single script to the widget's media that consumes these configures the widget.

Django1.9: MarkupField not saving in model forms

MarkupField works fine with direct model editing but no longer works when used within a model form.

My project is reproducing it with this test (that only has issue in Django 1.9):
https://github.com/WimpyAnalytics/django-andablog/blob/markup45/andablog/tests/test_entry_forms.py

Other, direct model, tests work fine in both 1.8 and 1.9. Like this one:
https://github.com/WimpyAnalytics/django-andablog/blob/markup45/andablog/tests/test_models.py

Test Results from PyPI version:
https://travis-ci.org/WimpyAnalytics/django-andablog/builds/97463824

How to enter HTML markup?

Sorry for the stupid question and it is probably better suited to be asked at the markitup repo but they don't have an issue tracker...

Is there a way to enter HTML markup into the editor? For example I would like to place a Google Maps iframe, but markitup always replaces all html tags with "MARKUP REMOVED".

Django 2.0 compatibility

When using django 2.0, I got this:
No module named 'django.core.urlresolvers' in markitup.templatetags.markitup_tags

Can't specify a 'cols' attribute in the form

Hello.

I am trying to resize the markitup widget to change the width. It doesn't appear to have any effect, however.
Is it possible to state the desired 'cols' attribute in the Forms.py file in order to scale the widget's width?

bio = forms.CharField(widget=MarkItUpWidget(attrs={'cols': 20}))

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.