GithubHelp home page GithubHelp logo

ncornette / python-markdown-editor Goto Github PK

View Code? Open in Web Editor NEW
206.0 13.0 55.0 1.46 MB

Standalone editor for your markdown files

CSS 3.26% JavaScript 93.24% Python 2.92% Smarty 0.58%
markdown editor javascript gfm python-2 python-3 browser extensible modular bottle

python-markdown-editor's People

Contributors

llazzaro avatar ncornette avatar rffontenelle avatar tveness avatar vaygr 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  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  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

python-markdown-editor's Issues

table not rendering as expected

i really, really like this tool but ran into a problem when I tested table rendering with this simple md:

# test table

<details>

<summary>Table</summary>

| Key | Value |
| --- | ----- |
| a | a value |
| b | b value |
| c | c value |

</details>

This is what was rendered:

Screen Shot 2021-06-28 at 6 09 28 PM

what am i doing wrong?

Indented code lines miss line breaks

I'm trying to make the following markdown code work properly:

**NOTES:**

1. one
2. two

    ```
    code line 1
    ```

    text

    ```
    code line 2
    code line 3
    ```

3. three

For some strange reason code line 2 and code line 3 are joined without any line break like this:

code line 2 code line 3

instead of showing 2 separate lines. On github and dillinger it works properly though.

Setup is the following:

  • python 2.7.9
  • python-markdown 2.6.6
  • pygments 2.0.2
  • bottle 0.12.9

unexpected keyword argument 'term_edit'

./markdown_edit.py README.md
Traceback (most recent call last):
File "./markdown_edit.py", line 385, in
main()
File "./markdown_edit.py", line 375, in main
markdown_processor = markdown.Markdown(**options)
TypeError: init() got an unexpected keyword argument 'term_edit'

if it helps, python 2.6.6 on a 64b RH derivative

Was the security ever concerned?

It is currently really easily possible to access the website from a device which is not the server, however this is logged but not disabled by default and I guess it's not implemented yet.

Multiple file editing in same server session

Right now the server is initiated to point to a particular file. It would be nice if one could open or save another file in the same folder directly from the browser.

Is this something there is any interest in pursuing?

I would like to use this project as a sort of personal wiki that I can connect through via ssh tunneling without having to kill/restart the server every time I want to edit a new file.

--

I have tried to type this in shell
$ markdown_edit README.md
It gave me
markdown_edit: command not found

localhost port

First, i say it's a very nice little python code and when we compare it to haroopad and its never ending list of dependencies it's nice to have something light.

my question:

  • it did fail at first for me because i was already using another SimpleHTTPServer instance , is it possible to add an option to define the default port or to chose one at random ?

Missing Dependenies

$ ./markdown_edit.py
Traceback (most recent call last):
File "./markdown_edit.py", line 13, in
import markdown
ImportError: No module named markdown

doing
yum install python-markdown
makes that error go away but I have no idea it that is necessary or sufficient.
for example, I also see a python-markdown2 package available

Issue with (current version of ) pymdown-extensions 8.x

Installing with pip the installation goes fine, but when launching the editor from command line it throws the following error:

ModuleNotFoundError: No module named 'pymdownx.extrarawhtml'

Uninstalling pymdown-extensions and reinstalling a previous version e.g. pymdown-extensions==7.0 solved the issue for me. This happens because the requirement for installation is pymdown-extensions>=2.0 but can quickly be fixed by specifying exact version.

Broken dependencies

After installing requirements with pip3 install --user -r requirements.txt I still get ModuleNotFoundError: No module named 'mdx_pymdownx'

No save button in firefox

Thank you very much for wonderful program, I am routinely using. I am facing difficulty in not having save button, the screen shot of the program in git folder I am using it for running is actually having.
screenshot from 2014-09-19 12 36 34 It is in Firefox, Ubuntu 12.04.

don't work , just the web and only on folder install

not working with the simple command like in documentation:
Launch editor without input file for testing :
$ markdown_edit

I need to go to the folder where is install and run it, that shows the web editor: http://localhost:8222/
... site-packages/markdown_editor/web_edit.py
see the install I used:

[mythcat@desk ~]$ pip install markdown-editor
...
[mythcat@desk ~]$ markdown_edit
bash: markdown_edit: command not found

Save and Preview Error in Chrome

Hi,
I just tested the most recent master branch (downloaded as zip). When press save or preview button I always got the Error message

Traceback (most recent call last):
  File "D:\Program Files\WinPython-64bit-2.7.10.2\Python-Markdown-Editor-master\markdown_editor\editor.py", line 145, in do_POST
    content, keep_running = action_handler(self.server.app.document)
  File "D:\Program Files\WinPython-64bit-2.7.10.2\Python-Markdown-Editor-master\markdown_editor\editor.py", line 286, in action_save
    result = document.get_html_page()
  File "D:\Program Files\WinPython-64bit-2.7.10.2\Python-Markdown-Editor-master\markdown_editor\editor.py", line 232, in get_html_page
    """.format(self.inline_css, self.get_html())
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2026' in position 2936: ordinal not in range(128)
Continue editing

My environment is Windows 10, Chrome Version 50.0.2661.102 m, WinPython-64bit-2.7.
Thanks!

Word wrap

More a pain point than a show-stopper, the editor piece doesn't account for any kind of word-wrapping.

Changes in pymdown-extensions break command-line invocation

Version 5.0 (released Aug 18) of pymdown-extensions deprecates the github extension.

This generates the following stacktrace when I run markdown_editor README.md:

Traceback (most recent call last):                                                                                                      │Icon-32.png         Info.plist          error.html          images              modals
  File "/Users/chb/.pyenv/versions/3.7.0/envs/mrkdwn/lib/python3.7/site-packages/markdown/__init__.py", line 231, in build_extension    │Icon-48.png         Settings.plist      format.txt          injection.js        overview
    module = importlib.import_module(ext_name)                                                                                          │Icon-64.png         circle.png          global.html         intro.html          sessions-export.zip
  File "/Users/chb/.pyenv/versions/3.7.0/lib/python3.7/importlib/__init__.py", line 127, in import_module                               │[chb-mbp-sierra:Sessions.safariextension chb]$ grep export *
    return _bootstrap._gcd_import(name[level:], package, level)                                                                         │global.js:      // which used to differ from the export format.
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import                                                                       │global.js:                      // This version and above are identical to the export format as described in format.txt.
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load                                                                     │global.js:var exportSessions = (function () {
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked                                                            │global.js:                              '\t<!-- NOTICE: This format is deprecated as an export and import option for Sessions. -->',
ModuleNotFoundError: No module named 'pymdownx.github'                                                                                  │global.js:      return function (exportFormat, sessionIDs, failCallback, completeCallback) {
                                                                                                                                        │global.js:              format[exportFormat](sessionIDs);
During handling of the above exception, another exception occurred:
...

markdown then tries a few other variations on module naming conventions before giving up.

I edited markdown_editor/editor.py such that the pymdown-extension tuple included a different extension (arithmatex in lieu of github). But given that the user has the option of naming their own with -x, maybe not include any by default?

I can't start the markdown-editor

Just installed with pip

pip install markdown-editor
Everything went ok, but neither markdown-edit or markdown-editor command works

Where is it installed?
How can i run it?

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.