-
-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow selecting static files in MarkdownEditor (#565)
This adds a new button to the MarkdownEditor (with icon `paperclip`). Clicking the button triggers the staticfilepicker modal. On selecting a file the editor gets updated depending on the file extension, If an image file was selected, *Markdown image tag* is inserted else a *Markdown link tag* is inserted. Irrespective of the file-type selected, the injected Markdown includes **the static-file's relative_path enclosed in a Liquid object with Jekyll's `relative_url` filter**. For example, if static-file `assets/logo.png` is selected, then the inserted Markdown will be: ``` ![]({{ 'assets/logo.png' | relative_url }}) ```
- Loading branch information
Showing
3 changed files
with
113 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters