Git Product home page Git Product logo

q2a-markdown-editor's People

Contributors

svivian avatar zachbears 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

q2a-markdown-editor's Issues

Would it not be better not to resize image when uploading?

Hi, First of all, thank you very much for the latest update. It has become indeed very useful.
Although the new image upload feature is great, resizing the image when uploading doesn't always result in a satisfying outcome.
Dont you think it would be much better if we uploaded the whole image, and either used a thumbnail linked to the original image or altogether went and uploaded the full-sized image?
In our site, users usually post screenshots of the errors they get, and when the image is resized, the text becomes unreadable!
what do you say?

``` and <code> code blocks ignore indentation

Hi there,

We're using this plugin on Godot Engine's Q&A, and I've noticed that the behaviour of the ``` and <code> tags seems to ignore indentation, which is quite annoying when typing code with strict indentation rules like Python or GDScript.

Some example:
image      image      image

On the other hand <pre> and an indentation of the whole block work fine:
image

I reckon that this is probably not a bug per-se, but just that <code> and any number of backquotes are interpreted as inline code markers, and such inline code does not support indentation or multiple lines code blocks. However many users are used to GitHub's Flavoured Markdown and how it use triple backquotes to delimit pre-formatted code blocks. It would be nice to have support for something similar in q2a-markdown-editor.

How to make wmd-button-bar image scrollable?

Hi Scott
Thank you for the plugin.
In the small devices the button bar is invisible. How to make it scrollable like this site(pokemondb):
pokemondb

At the moment it's not visible in snowflat theme:
q2a

Thanks.

Escaped Characters not saving

If you make a post with escaped characters like , it previews and posts correctly the first time. If you go back to edit a post that has escaped characters, however, it loses the escaping backslash. This means that if I type my\\windows\\path\\ it will save correctly as my\windows\path, however if I go and edit it, it will appear in the edit box as my\windows\path and then subsequently save as mywindowspath.

Awesome plugin by the way :-)

Single and double quotation marks print back slashes

Examples:

This:
MessageBox.Show("Mesage", "Title", MessageBoxButtons.OK, MessageBoxIcon.Information) ;

Shows this:
MessageBox.Show("Mesage", "Title", MessageBoxButtons.OK, MessageBoxIcon.Information) ;

This:
eval ('$'.$a.'='.$b);

Shows this:
eval (\'$\'.$a.\'=\'.$b);

How can this be fixed ? A lot of posts are going to be incorrect because of this.

Thanks.

Problem with q2a confirm master & markdown

Hi Svivian,
just to let you know that I found a problem between q2a confirm master & markdown, because I ask a minimum of caracters when creating a post (exemple with my q2a http://odlg.org , http://net-on.org and http://mr-ginseng.com ) and it work fine with markdown only when creating a post, but not when replying to a question.
The problem is when users try to answer questions, (and I put a minimum of caracter) confirm master always ask confirmation (so user cant understand why), so they have to leave the page (and lost everything). So you will tell me that the problem come from confirm master, but its working fine with other editors thats the point.

I hope I was clear enough.. ;)

the code and preview sections wont show scrolls when the text is overflown

As you can see in the picture below, the text is not showing, and there is no scroll at all either.
capture

I have changed the wmd.css and added overflow-x:auto; to both code pre and .wmd-preview pre
so they look like this now :

.qa-q-view-content pre,
.qa-a-item-content pre,
.wmd-preview pre {
    overflow: auto;
    width: 100%;
    max-height: 400px;
    padding: 0;
    border-width: 1px 3px 1px 1px;
    border-style: solid;
    border-color: #ddd;
    background-color: #eee;
        overflow-x:auto;
}
code {
    direction: ltr;
}
pre code {
    display: block;
    padding: 8px;
    text-align: left;
    direction: ltr;
        overflow-x:auto;
}

yet nothing changes.
the irony is , if I change the css attributes using the browsers inspect element, adding the overflow-ax:auto fixes the problem, but the actual changes to the actual css seems not to be taken into account some how.

Plugin introduces HTML code which is not valid

The HTML introduced by the plugin is not valid. Here is a patch to make it valid.

--- a/qa-plugin/markdown-editor/qa-markdown-editor.php
+++ b/qa-plugin/markdown-editor/qa-markdown-editor.php
@@ -24,7 +24,7 @@ class qa_markdown_editor
    function get_field(&$qa_content, $content, $format, $fieldname, $rows, $autofocus)
    {
        $html = '<div id="wmd-button-bar-'.$fieldname.'" class="wmd-button-bar"></div>' . "\n";
-        $html .= '<textarea name="'.$fieldname.'" id="wmd-input-'.$fieldname.'" class="wmd-input">'.$content.'</textarea>' . "\n";
+        $html .= '<textarea name="'.$fieldname.'" id="wmd-input-'.$fieldname.'" class="wmd-input" cols="80" rows="15">'.$content.'</textarea>' . "\n";
        $html .= '<h3>Preview</h3>' . "\n";
        $html .= '<div id="wmd-preview-'.$fieldname.'" class="wmd-preview"></div>' . "\n";

@@ -33,7 +33,7 @@ class qa_markdown_editor
         // $html .= '<script src="'.$this->pluginurl.'pagedown/Markdown.Editor.js"></script>' . "\n";

        // comment this script and uncomment the 3 above to use the non-minified code
-        $html .= '<script src="'.$this->pluginurl.'pagedown/markdown.min.js"></script>' . "\n";
+        $html .= '<script src="'.$this->pluginurl.'pagedown/markdown.min.js" type="text/javascript"></script>' . "\n";

        return array( 'type'=>'custom', 'html'=>$html );
    }

And

--- a/qa-plugin/markdown-editor/qa-md-layer.php
+++ b/qa-plugin/markdown-editor/qa-md-layer.php
@@ -48,7 +48,7 @@ class qa_html_theme_layer extends qa_html_theme_base
        if ( $usehljs )
        {
            $this->output_raw(
-                "<script src=\"" . QA_HTML_THEME_LAYER_URLTOROOT . "pagedown/highlight.min.js\"></script>\n" .
+                "<script src=\"" . QA_HTML_THEME_LAYER_URLTOROOT . "pagedown/highlight.min.js\" type=\"text/javascript\"></script>\n" .

                "<script type=\"text/javascript\">\n" .
                "$(function(){\n" .

Preview not working

I have installed the plugin in the qa-plugin/ folder and I have activated it on the admin panel. Markdown renders perfectly, but the preview is not showing. Am I missing something?

How to enhance syntax highlighting ?

the current syntax highlighter doesn't seem to do much of a work. below is a Matlab snippet
image
As you can see, syntax highlighting is almost non-existent! is this normal?
Is there a way to remedy this?
I tried using the common pack from here , downloaded the highlight.js file, uploaded it to the pagedown directory, replaced it with the existing one, also uploaded the styles folder which was downloaded alongside the js file. yet nothing changed!
I would be grateful if you could shed some light on this and how should someone go about it in order to have a working/decent synatx highlighting capability.

code block not working if it is the first element

I imagine that some kind of trim() is being called on the input to the edit box during the save step, because if you start input with 4 spaces, the preview pane looks fine, but when you go and post it, the code block is messed up because it loses the first 4 spaces. It may not be necessary/desired to trim the input like that - it seems like a bug from my point of view.

Is this plugin compatible with Q2A 1.7??

I think preview feature of this editor is killing. So that feature alone makes this editor makes it one of the best in Q2A.
But I need to be sure that, if the plugin is compatible to Q2A 1.7 before I apply this on my website.

A markdown editor bug? cannot show corrected formula with mathjax

I use markdown editor and mathjax to write math formula, sometimes it cannot show corrected form, here is the example:

$$(A_2)\int_{-\infty}^{+\infty} dx $$

Is this a markdown editor's bug?

When I use Basic Editor,it is OK.

Furthermore, in the Preview of markdown editor, the formula shows OK, but when I finish the editor, the answer shows problem.

Problem with underscore and italic with certain variable names.

Some questions use names such as Foo_Bar. If the name occurs twice pagedown seems to detect it as an italic directive.

This sentence:

Lorem Foo_Bar is Foo_Bar ipsum.

will look like

Lorem Foo Bar is Foo Bar ipsum.

without the space preceding the first Bar and succeeding the second Foo.

For example. Github flavored markdown does not allow for starting italic mid-word using this syntax.

It is possible to correct this behavior (not allow starting italic mid word and end it mid word) or disable the underscore as an italic operator?

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.