mudrd8mz / moodle-editor_marklar

Markdown friendly editor for Moodle
GNU General Public License v3.0
17 stars 3 forks source link

Support adding file links via file picker #5

Closed juancs closed 8 years ago

juancs commented 8 years ago

This patch adds support for file embedding via filepicker.

mudrd8mz commented 8 years ago

Thanks Juan for this pull request. I am aware of the Moodle core support for embedded files in the editor fields. However, I also know that feature was not always seen as a good one and it opened some discussions of whether it should be supported at all.

Thing is, Moodle forms where it makes sense to append additional files, should have a dedicated field for files attachment via the filemanager field type.

As one of the design principles of the Marklar editor is to keep it really simple and focused only on essential text editing features and nothing more, I would like to discuss the actual usefulness of the addition proposed in this pull request.

Can you rise some valid use-cases where you need to embed files into the editor field?

juancs commented 8 years ago

Thanks David for answering. Please, feel free to drop this pull request :) I should have asked before... but it was delightfully easy to write the patch :) Now my point of view:

The fact is that this feature is something requested by some of our Markdown-content producers (aka teachers). We don't have Marklar currently installed in production but it'll be in summer. The fact is this: there's no direct (or easy) way to put a link to a file resting in moodle when editing in Markdown.

A use case can be adding a file in a Page content field. This is one use case. Sure others exist.

Thanks in advance David.

[OT] - I've just realised that Marklar is not active in a description field when adding a new activity. Is this an expected behaviour?

mudrd8mz commented 8 years ago

Thanks. I don't want to drop this pull request. I just wanted to understand more the motivation behind the change. I learnt that implementing features "just because we can" does not really help. And yes, I agree with the use case to easily link to other files when editing things like Page.

I'll proceed the pull request later this week, thanks.

juancs commented 8 years ago

Thank you David :)

mudrd8mz commented 8 years ago

Thanks Juan, this will be part of the next release 0.3.0