Skip to content

Support MD preview. Allow editing lua files. Use the latest ACE editor.#324

Closed
lchen198 wants to merge 1 commit intoprasathmani:masterfrom
lchen198:master
Closed

Support MD preview. Allow editing lua files. Use the latest ACE editor.#324
lchen198 wants to merge 1 commit intoprasathmani:masterfrom
lchen198:master

Conversation

@lchen198
Copy link
Copy Markdown

I don't have much experience with PHP and web development in general. Feel free to make changes on what I have.

  • Use showdownjs to render MD file on client side. This is useful to preview markdown without any server side markdown support. The idea is that tinyfilemanager could be used to create a static website or blog similar to
    http://dynalon.github.io/mdwiki/#!index.md

Screenshot:
https://ibb.co/TKD57vF

  • Treat .lua as text file.
  • Update ACE editor.

Copy link
Copy Markdown

@imranzahid01 imranzahid01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The merge will cause a Javascript error, make the changes as suggested in the comments

Comment thread tinyfilemanager.php
echo '<pre class="x-mdhere">';
echo $content;
echo "</pre>";
echo "<script>show_md();</script>";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will throw a Javascript error that show_md() doesn't exists. The reason is that this method hasn't been defined yet. It is defined in the footer

Comment thread tinyfilemanager.php
}
markdown_els[i].innerHTML = converter.makeHtml(text);
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call this method in the // Dom Ready Event

@prasathmani prasathmani closed this Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants