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

[4.0] Markdown content entry #31911

Merged
merged 6 commits into from Jan 24, 2021
Merged

[4.0] Markdown content entry #31911

merged 6 commits into from Jan 24, 2021

Conversation

brianteeman
Copy link
Contributor

@brianteeman brianteeman commented Jan 8, 2021

Summary of Changes

Adds the ability to use markdown style content editing with tinymce
This is disabled by default.

Testing Instructions

Apply the PR
In the tinymce plugin select SET 0
Scroll down and turn ON the markdown style editing
Save and close and then open an article

Insert standard markdown. As soon as you press space or enter the content will be rendered as html. It is always saved as html.

Supported markdown

# This is an <h1> tag
## This is an <h2> tag
### This is an <h3> tag
#### This is an <h4> tag
##### This is an <h5> tag
###### This is an <h6> tag
*This text will be italic*
**This text will be bold**
1. ordered list item
* unordered list item
- unordered list item

Expected result AFTER applying this Pull Request

Editor

mark

Plugin

image

Documentation Changes Required

yes

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-4.0-dev labels Jan 8, 2021
@ChristineWk
Copy link

I have tested this item ✅ successfully on 9ee149b


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31911.

@toivo
Copy link
Contributor

toivo commented Jan 9, 2021

I have tested this item ✅ successfully on 9ee149b

Tested successfully in Beta7-dev of 9 January.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31911.

@joomla-cms-bot joomla-cms-bot removed Language Change This is for Translators PR-4.0-dev labels Jan 9, 2021
@alikon
Copy link
Contributor

alikon commented Jan 9, 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31911.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jan 9, 2021
@richard67 richard67 added Language Change This is for Translators PR-4.0-dev labels Jan 9, 2021
@infograf768
Copy link
Member

imho his needs a description with example as the label is not enough to understand what this field means.

@infograf768
Copy link
Member

Also, it is a new feature, and therefore not for 4.0

To understand fully what it meant, I had to go to https://fr.wikipedia.org/wiki/Markdown (for French details)

@chmst
Copy link
Contributor

chmst commented Jan 9, 2021

Good feature. But only few users will know what it means and how to use it. I agree with @infograf768 that this needs good description.

@infograf768
Copy link
Member

Also, one has to understand that if the field is set to yes, then when one wants to write a specific markdown code NOT as a markdown, he/she will get weird results
For example if I use # and I do NOT want a h1.

This means that the description should include a link to a page like the one in wikipedia, which has equivalent pages for most languages so that Translators can add custom link.

@infograf768
Copy link
Member

infograf768 commented Jan 9, 2021

Something like
PLG_TINY_FIELD_TEXTPATTERN_DESC="Uses \"Markdown\" to apply styles. This may have undesired consequences when using its specific characters. Full details can be found here <a href=\"https://en.wikipedia.org/wiki/Markdown" target=\"blank\">Markdown codes</a>"

After discussion in Maintainers chat, setting this back to pending.

@infograf768
Copy link
Member

Pending


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31911.

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jan 9, 2021
@infograf768
Copy link
Member

infograf768 commented Jan 9, 2021

In fact wikipedia, although explaining what is markdown, does not explain which patterns can be used
Some explanation here, but not a full list of default possibilities.
https://www.tiny.cloud/docs/plugins/opensource/textpattern/

In English only, alas.

@brianteeman
Copy link
Contributor Author

brianteeman commented Jan 9, 2021

As stated in the original post this needs documentation which I will write

As for the undesired consequences - thats why its not enabled by default although its unlikely to cause any problems

As for it being a new feature. Its not really as we are already shipping the code I have just enabled the ability to use it. Or in other words fixed a bug that new features in tinymce were not considered when this new version was introduced in joomla 4

While this might be a really minor change its the sort of thing that appeals to users and is a more marketable feature than most oif the changes in j4

@alikon
Copy link
Contributor

alikon commented Jan 9, 2021

if everything is considered a new feature....and have to wait till 4.1, while we are still in beta...
👎

@infograf768
Copy link
Member

As stated in the original post this needs documentation which I will write

This is not enough. We need a description to alert the user about the feature, as stated above.

@brianteeman
Copy link
Contributor Author

image

@infograf768
Copy link
Member

Sorry, for me it is not enough... If I had not seen this PR and looked for Markdown on the internet I would have no idea what it is for. And, as I wrote, it should be an alert to the user that this may interact with usual TinyMCE behaviour in case some of this markup syntax is undesired.

@brianteeman
Copy link
Contributor Author

I guess that you have never used markdown on github or the issue tracker then. I can't fix that.

@infograf768
Copy link
Member

Also, at reading the wikipedia article, I looks like Markdown should always be capitalized.
https://en.wikipedia.org/wiki/Markdown

@brianteeman
Copy link
Contributor Author

No point in me changing that as you will still object to moving into the 21st century

@infograf768
Copy link
Member

I guess that you have never used markdown on github or the issue tracker then. I can't fix that.

I use some of them but I did not even know the name of that functionality.
Anyway, it is totally irrelevant to the point at stake as it is certainly not a common knowledge among J! user.

No point in me changing that as you will still object to moving into the 21st century

That is an argument you and some others repeat all the time when someone does not agree, and it is frankly insulting.
Did I say we should not include this feature in J ?
Certainly not. I just said users should be informed of what they do to make J friendly.
AND NOT ALWAYS USE THE PRETEXT OF DOCS to not do so.
Your refusal to even consider this is just shocking.

@brianteeman
Copy link
Contributor Author

Anyway, it is totally irrelevant to the point at stake as it is certainly not a common knowledge among J! user.

That's a fact because you know the mind of all joomla users??

Did you also insist the same for the codemirror editor?
image

Seriously JM you have to stop insisting that because you don't know about something then no one else possibly can know.

This is an optional feature that is disabled by default. If you don't know what it does then a normal user would either ignore it or check the help (which I already said I would update). That's the same for everything

@ChristineWk
Copy link

Good feature. But only few users will know what it means and how to use it.

Exactly.

Peace please :-)
A few words from a normal user like me. Not a programmer or anything else.

Never used Markdown before. A few months ago, I asked someone what this was for. Then got information that it is used here on Github. Then I saw this PR and tried it out.

The instructions for this were helpful to me as well as the gif. Otherwise I would not have known how to get to this result. For me this PR was to test the function. Of course, I can't say whether I'll ever use it in conjunction with Editor.

@brianteeman
Copy link
Contributor Author

The instructions for this were helpful to me as well as the gif.

that would be the basis of the documentation

Of course, I can't say whether I'll ever use it in conjunction with Editor.

100% not for everyone. It's something some 3pd editors offer and as we already shipped the library it made sense to make it available to those that might want it.

@toivo
Copy link
Contributor

toivo commented Jan 10, 2021

My 2c: this PR should be part of J4. Markdown is a welcome addition to the editing capabilities in Joomla, useful not only to those who have used editors at docs.joomla.org and wikipedia.org.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31911.

@toivo
Copy link
Contributor

toivo commented Jan 10, 2021

I have tested this item ✅ successfully on 5588789

Tested successfully in Beta7-dev of 10 January.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31911.

@infograf768
Copy link
Member

My 2c: this PR should be part of J4. Markdown is a welcome addition to the editing capabilities in Joomla, useful not only to those who have used editors at docs.joomla.org and wikipedia.org.

Fine with that. I was wrong stating it can be considered as new feature. Nevertheless, we need a description with a real meaning/warning.

@ghost
Copy link

ghost commented Jan 10, 2021

I have tested this item ✅ successfully on 5588789


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31911.

@wilsonge wilsonge merged commit ad3e0d9 into joomla:4.0-dev Jan 24, 2021
@wilsonge
Copy link
Contributor

Let's go with it. We can update the description as required as we go

@wilsonge wilsonge added this to the Joomla 4.0 milestone Jan 24, 2021
@brianteeman
Copy link
Contributor Author

Thanks - I will update the docs site tomorrow

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.

None yet

10 participants