Loading...
 
Features / Usability

Features / Usability


[Solved] Markdown requirements, Tiki flavored, Github flavored and additional options... (confused)

posts: 8633 Israel

Hi,

I enabled markdown on a newly installed Tiki25 (theme was cleanly recreated) and I can't edit the pages anymore.

I refreshed the caches and changed browser, used incognito tab... nothing.
Is there more requirement than enabling the feature ?


-


Also, I'm a bit confuse about the markdown settings.

I want enable Markdown and convert existing site with Wiki syntax to Markdown.
(good to test and use a new feature of Tiki)

At /tiki-admin.php?page=textarea#contentadmin_textarea-1 we have an option to enable Markdown. Enabling it reveal 2 additional options:

  • Github-flavored markdown
  • Default syntax


It pretty hard to foreseen the results of enabling the "Github-flavored markdown" option as the tooltip doesn't really help:
Enable Github-flavored markdown.
Preference name: markdown_gfm

I followed the help link and also searched at doc.t.o


"New in Tiki25 is an option to use Tiki Flavored Markdown, which is essentially GitHub Flavored Markdown (GFM) with additional syntax, which itself is essentially CommonMark with additional syntax, which itself is a standardized Markdown."

The doc at https://github.github.com/gfm/ is too hairy for me ...

What does GitHub Flavored Markdown ?
Is it necessary to convert a site, what does it add ?

posts: 126886 United Kingdom

That looks odd - some questions:

  • Do you have wysiwyg enabled? And it is the default?
  • If so then there are probably some javascript errors in the js console.
  • I presume composer installed everything ok? No errors there?
  • What happens when you edit an old tiki markup page?
  • What happens if you set tiki as the default and create a new page?
posts: 8633 Israel
Jonny Bradley wrote:

That looks odd - some questions:

  • Do you have wysiwyg enabled? And it is the default?
  • If so then there are probably some javascript errors in the js console.
  • I presume composer installed everything ok? No errors there?
  • What happens when you edit an old tiki markup page?
  • What happens if you set tiki as the default and create a new page?

  1. Never used "wysiwyg" on this site and it is not enabled nor default.

(I didn't see any error about WYSIWYG not being enabled)

  1. I have errors in the console
    1. On Firefox:
Copy to clipboard
Uncaught ReferenceError: tikiToastEditor is not defined <anonymous> https://bernardsfez.com/tiki-editpage.php?page=my+markdown+test:1757 e https://bernardsfez.com/temp/public/min_main_3a3f1a0bc8e1fd3d06266f8bc163e4b2.js:109 t https://bernardsfez.com/temp/public/min_main_3a3f1a0bc8e1fd3d06266f8bc163e4b2.js:109
    1. On Safari I have
Copy to clipboard
[Error] ReferenceError: Can't find variable: tikiToastEditor (anonymous function) (min_main_3a3f1a0bc8e1fd3d06266f8bc163e4b2.js:109:31711) [Error] Unrecognized Content-Security-Policy directive 'require-trusted-types-for'.
  1. Previous pages can be edited however I see the same errors in the console...
  2. After switching to "Tiki-style wiki syntax" I can create a new page an access the editing interface. But the toolbar look different.

Screen Shot 2022 11 23 At 23.08.25

posts: 126886 United Kingdom

That function tikiToastEditor is only in two places in tiki, both check for markdown enabled and $prefs['feature_wysiwyg'] === 'y' and that screen shot of the toolbar is the CKEditor one, still used for tiki syntax WYSIWYG, so you definitely must have feature_wysiwyg enabled.

Not sure how this could have happened in the upgrade but if you can reproduce it in a new tiki, or send me the pre-upgraded database i'll try and see what happened?

However, if you do have WYSIWYG enabled then Toast UI should be available (and is defined in lib/toastui_tiki/tiki-toastui.js) so something is quite wrong here...

posts: 8633 Israel

Hi Jonny,

Jonny Bradley wrote:
.../... that screen shot of the toolbar is the CKEditor one, still used for tiki syntax WYSIWYG, so you definitely must have feature_wysiwyg enabled


Well as you can see in this videoshoot, I don't have it enable and settings are default. ๐Ÿคท๐Ÿปโ€โ™‚๏ธ

About solving this:
I don't need markdown. I just wanted to test and evaluate so I'm not stressed and don't want to add more work on your plate. ๐Ÿ˜‡
I'm interested to see it working in Tiki of course.

This is my personal site, I have nothing really confidential and I have backups.
I can give you the key of the site or the database before upgrade.

posts: 126886 United Kingdom
Ok, i didn't try it with that combination of prefs, but think i've reproduced it now, should have a fix soon - thanks for the feedback!

posts: 8633 Israel

Ok, well done it look better.

But take a look at the screenshot.
This the same test page as previously. (previously they were no editing area)

Now, after updating, on first edit this is what I had in the text area.
Thats freaky, I didn't put that here. ๐Ÿ˜‚

Screen Shot 2022 11 25 At 17.34.13

posts: 126886 United Kingdom

You should delete that page and start again, or edit it to say editor="plain" due to the bug that was there when you created it.

The Invalid syntax type selected. Valid values: tiki or markdown. plugin on the first line is how tiki now decides which syntax and editor to use in a textarea, so this is now available in all placed (blogs, comments etc). There is some new javascript code that should hide that from you while editing and then replace it when you save, so maybe you need to clear you browser caches again to get that working?

HTH smile


posts: 8633 Israel

Ok I deleted and re-create (twice) a page after I set the following settings:

  • Preference markdown enabled enabled (Preference name: markdown_enabled)
  • Preference markdown default set (Preference name: markdown_default)


As the toolbar look different this time I understand I'm on "Markdown" mode.

Screen Shot 2022 11 25 At 23.29.50

I tried to use the syntax found at : https://www.markdownguide.org/cheat-sheet/
... Doesn't work.

I went back to the Wiki page help and see "Mardown Syntax" but it show the usual wiki syntax. There is also a link to http://doc.tiki.org/Markdown-syntax but it goes to a "page not found".

... Seems the feature is not ready yet for end user . ;-)

posts: 126886 United Kingdom

Sorry @Bernard Sfez / Tiki Specialist, that seems more broken than any of the other tests are finding it - i just pushed a rather critical fix for wysiwyg, so that probably won't help here.

Which browser are you using?

Want me to have a go? mrgreen


posts: 8633 Israel

Hello Jonny,

I saw Victor commits and did a new session today after updating.

Seems better and I will now report on the dev tracker.

My intention was to test and complete the documentation so simple mortal not only knows that Tiki integrate Markdown, but also could also use it. ;-)

To the common good, I will send you admin access to my site. (I have backups)



posts: 8633 Israel

@Jonny Bradley (and all),

In the meantime and as a start...

The help link from the inline text area help in Tiki was sending to an inexistent page at doc.
I created https://doc.tiki.org/Markdown-syntax

I didn't go far with the samples, because I wonder if we couldn't have ONE sample and usage description used on this page, on the inline help, etc. Instead of maintaining 2 or more of the same list/table.


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting