Skip to content
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

How to create a custom extension #2

Open
Eraldo opened this issue Jan 23, 2016 · 4 comments
Open

How to create a custom extension #2

Eraldo opened this issue Jan 23, 2016 · 4 comments

Comments

@Eraldo
Copy link
Contributor

Eraldo commented Jan 23, 2016

Nice work! :D

I was just about to create a field for simpleMDE.
I am glad you have already done so.

I am curious if you have already thought of ways to add custom extensions.
At the moment I do not see a configuration for that in the widget's render function.
I order for me to use your field 'as is' it would be nice to include some kind of hook for mdx extensions.

Or do you have any other ideas/approaches/advice? What do you think?

PS: The option of being able to also add css styles would also be great.. but hey - a step at a time. ;)

@onepill
Copy link
Owner

onepill commented Jan 23, 2016

Hi @Eraldo
Thanks :)
And for custom extensioins, what kind of extensions? is there an example?
And your are always welcomed to fork and create pull request.
Thanks.

@Eraldo
Copy link
Contributor Author

Eraldo commented Jan 24, 2016

On Sat, Jan 23, 2016 at 7:14 PM, Siyuan Zhang [email protected]
wrote:

And for custom extensioins, what kind of extensions? is there an example?

  1. Standard python markdown extensions like:
    https://pythonhosted.org/Markdown/extensions/index.html#officially-supported-extensions
    1. Custom extensions. Example: If I want to have '<:page_name|Page Name>'
      create an anchor link to an internal page.
      For configuration you could take a look at:
      https://github.com/klen/django_markdown

\o/,
Eraldo

/============================================
| E r a l d o E n e r g y
| Coach: Personal Development
| Dancer: Salsa, Bachata, Kizomba & Co.
| Developer: Python/Django

Legend: coLegend.org http://www.colegend.org
M: +49 176 97 99 44 80 <004917697994480>
E: [email protected]
W: www.eraldo.org
S: www.facebook.com/Eraldo
============================================
Be Awesome! Love with an Open Heart! And Live a Legendary Life.. Today!

@onepill
Copy link
Owner

onepill commented Jan 24, 2016

Hi @Eraldo , since this plugin doesn't support rendering markdown(the preview feature comes with SimpleMDE), you need to render it with python-markdown or other implements, so technically it supports https://pythonhosted.org/Markdown/extensions/index.html#officially-supported-extensions if you use python-markdown to render the markdown content.

Thanks

@Eraldo
Copy link
Contributor Author

Eraldo commented Jan 24, 2016

I am working on that.. and intend to create a pull request to bundle it with django-simplemde.
I stumbled across commonmark and drifted off reading about it. ^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants