Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add experimental markdown rendering #291

Merged
merged 20 commits into from Apr 11, 2018
Merged

Conversation

glensc
Copy link
Member

@glensc glensc commented Sep 9, 2017

this works surprisingly well. currently enabled in issue description area.

to test this (besides getting code from this branch and updating composer):

define in config/setup.php

return [
    'markdown' => 'enable',
...

UPDATE: the option can now be changed from general settings and user preferences.

@inguin
Copy link
Contributor

inguin commented Nov 29, 2017

Works great for me. Only issue is that clicking the 'fixed width' link messes up the display. This can be easily fixed by replacing the description with $issue.iss_original_description when switching to fixed with display.

@glensc
Copy link
Member Author

glensc commented Nov 30, 2017

can you propose patch?

@inguin
Copy link
Contributor

inguin commented Dec 1, 2017

Maybe like this: inguin/eventum@24f6510

@glensc
Copy link
Member Author

glensc commented Dec 5, 2017

checked in as dc972f8...4ddf69f

glensc referenced this pull request in inguin/eventum Dec 5, 2017
The 'fixed width' mode for the issue description conflicts with markdown
formatting. Render two description nodes, one with variable width and
formatting, one with fixed width and no formatting. The 'fixed width'
link toggles display between the two.
glensc and others added 16 commits April 11, 2018 11:02
not sure why, that was there for iss_description since initial commit f51c769
extensible and faster (uses tokenizing instead of regexps)
this way existing messages will be rendered almost okay.
used by Custom_Field::formatValue
breaks custom field formatting
it broke issue display too, but wasn't important there earlier
this one is called from EmailHelper formatter
The 'fixed width' mode for the issue description conflicts with markdown
formatting. Render two description nodes, one with variable width and
formatting, one with fixed width and no formatting. The 'fixed width'
link toggles display between the two.
@glensc glensc changed the title WIP: add experimental markdown rendering Add experimental markdown rendering Apr 11, 2018
@glensc glensc added this to the 3.4.0 milestone Apr 11, 2018
@glensc glensc merged commit 430c3c6 into eventum:master Apr 11, 2018
@glensc glensc deleted the experiment/markdown branch April 11, 2018 10:19
@glensc
Copy link
Member Author

glensc commented Apr 13, 2018

looks like the links formatting got broken (none rendered as html links) with markdown disabled mode.

this needs to be fixed.

cc @balsdorf

@rtmaki
Copy link

rtmaki commented May 15, 2018

It's one solution, but not exactly what I was hoping for. I was hoping for the ability to copy directly from a web page, or just take a screen shot and paste in the image from the buffer etc. This is something that can be done with WSYWIGs sometimes. Even if we could just upload the image, and then have an insert image icon so that we can have a quick way to format images properties (height, width, src= etc.) In the meantime however, your solution will work for images, just a bit more clunky for the non technical users. Thanks for your update! :-)

@glensc
Copy link
Member Author

glensc commented May 15, 2018

markdown should support html to some extent, but i haven't tested this.

@rtmaki
Copy link

rtmaki commented May 17, 2018

With turning on Markdown, and then installing CKEditor on any textarea I wanted, it works amazingly well now. With CKEditor with image upload support, I can copy and paste from the buffer, and can also drag and drop files etc. This would be a cool feature to add out of the box :-) .. thanks for your help! This can be closed now! It was not working with just markdown enabled by itself.

@glensc
Copy link
Member Author

glensc commented May 18, 2018

so, submit your changes as pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants