WYSIWYG in Question textbox on initial creation of entry

You have a suggestion for a future version of phpMyFAQ? Then post it here!

Moderator: Thorsten

Post Reply
TIG
Posts: 4
Joined: Thu Mar 24, 2016 10:41 am

WYSIWYG in Question textbox on initial creation of entry

Post by TIG »

When I create a new entry through "Add new FAQ" or "Add question" there is no WYSIWYG in the Question textbox (there is one in the Answer textbox though).
I also noticed that there is a different version of WYSIWYG when editing a existing question. Is it possible to add this to the Question and Answer textboxes?

I have added a screenshot of the text editor that I would like to use on the initial creation of a new entry, which can be found under "Content" > "edit question".
You do not have the required permissions to view the files attached to this post.
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: WYSIWYG in Question textbox on initial creation of entry

Post by Thorsten »

Hi,

you can activate the WYSIWYG editor in the frontend via the admin configuration panel.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
TIG
Posts: 4
Joined: Thu Mar 24, 2016 10:41 am

Re: WYSIWYG in Question textbox on initial creation of entry

Post by TIG »

Hi Thorsten,

Thank you for your reply. I had this activated but it only activates it in the Answer texbox, not in the Question textbox.

With kind regards,
Christiaan
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: WYSIWYG in Question textbox on initial creation of entry

Post by Thorsten »

Hi,

there's no WYSIWYG editor for questions even in the backend as it's only a question.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
chris
Posts: 8
Joined: Thu Jul 15, 2021 3:34 pm

Re: WYSIWYG in Question textbox on initial creation of entry

Post by chris »

Hi,

it's an old task but I want to renew the suggestion for making WYSIWYG editor possible even on questions.

I understand the idea in "It's only a question", but maybe someone (like me) want to use/validate your real good piece of software for knowledge database with a touch of including supporting requests so sometimes uploaded screenshot make it easier to identify the questioners underlying idea or problem and then generate a new faq out of this...

Of course this can be solved with a new FAQ proposal but it would be a little bit clearer when seperating requests from faqs...

By implementing this in the configuration, the user is able to deside if he want that feature or not and the effort of implementing should be manageable since the editor is implemented elsewhere.

It would really be great, if you implement this feature.

Many thanks in advance, Chris
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: WYSIWYG in Question textbox on initial creation of entry

Post by Thorsten »

Hi,

what kind of content do you want to add in the question?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
chris
Posts: 8
Joined: Thu Jul 15, 2021 3:34 pm

Re: WYSIWYG in Question textbox on initial creation of entry

Post by chris »

Hi Thorsten,

ich schreibe mal auf deutsch weiter, geht schneller ;)

na ja, super wäre, wenn einfach der tinyMCE so wie im admin Bereich auch im Standardbereich eingebunden werden könnte, so dass ein Anfragender einen Text schreiben und an den entsprechenden Stellen einen Screenhot einfügen könnte.

Hatte heute sonst nichts zu tun und mir die Implementierung des tinyMCE mal angeschaut.

Hatte gedacht bei den FAQ-Vorschlägen wären der Image-Upload möglich, dann wäre es relativ einfach gewesen...
Die flexible Implementierung (Pfade usw.) wie im footer des Admin-Bereichs und somit ausserhalb der html-Templates habt Ihr aber nur im admin Bereich drin...

Ist auch völlig ok so, wenn man das Tool nicht anders nutzen möchte, schon wegen der Sicherheitsbetrachtungen.

Ist eine Software-Philosophische Sache.

Deshalb will ich Euch da auch gar keine Zeit kosten, es wäre vielleicht eher als Ableger der Standardversion denkbar, bei der man eben nur eine überschaubare und nicht öffentliche Benutzergruppe hat.

Eigentlich wollte ich versuchen mit sehr überschaubaren Änderungen einzugreifen, Eure Programmierung/Codeschnipsel zu nutzen und so möglichst in Eurer Struktur zu bleiben, aber in dem Fall ist das (für mich, der sich gerade mal einen Tag in Euren Code eingelesen hat) doch was Größeres und ich musste doch schon einige Änderungen an unterschiedlichen Scripten machen, was ein wieder Anpassen nach Updates nicht so easy macht.

Habe eigentlich ein eigenes durch Benutzer erweiterbares kleines FAQ-Tool, welches es u.A. ermöglicht, durch Setzen von Tags auf bestimmten Seiten automatisch relevante FAQs einzublenden. Beim aktuellen Projekt wäre aber eine größere Lösung besser und da bin ich über Euer tolles Tool gestolpert.

Ich bin heute immerhin soweit gekommen, den tinyMCE via phpS-Script auch bei den Fragen flexibel soweit zu integrieren, daß dieser tut, inklusive Speichern der Frage (übersprihe bei aktiviertem tinyMCE die Prüfung auf Antworten). Um es nicht zu aufwändig zu machen habe ich dafür aber die index.php, index.html usw. angepasst um am Ende ein phpscript abzuarbeiten (da ask.php vor dem HTML-Header eingebudnen ist) welches bei entsprechnder Konfig-Var den tinyMCE mit den Pfaden usw. am Ende (vor </body></html>) integriert, damit ich nicht auch noch zun sehr in das parsen des Templates eingreifen muss), habe den ajax-Handlers gemäß Eurem savefaq angepasst usw. Bildupload ist vorbereitet, allerdings hängt es gerade noch nach dem Absenden des Bildes, auch wenn ich bereits den relevanten ajax-Teil aus der admin/index.php ,eingebaut habe... den Ablauf wollte ich mir bei Gelegenheit die nächsten Tage mal ansehen. Programmiere das eben so ein bisschen mit copy/paste und will nicht mehr als 3 Arbeitstage verwenden. Wenn es dann geht ist gut, wenn nicht, dann nicht.

Wie auch immer, wenn es tut schicke ich Euch meine (dann nicht besonders schöne) Umsetzung, falls Ihr Interesse habt.

viele Grüße und ein schönes WE,

Chris
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: WYSIWYG in Question textbox on initial creation of entry

Post by Thorsten »

Hi Chris,

ich bin immer offen für Anpassungen und Verbesserungen! Wenn du direkt Pull Requests auf Github stellst, ist die Chance sehr groß, dass ich das auch mit aufnehme.

Einzige kleine Regel: neue Features bitte immer nur in kommende Version (derzeit 3.1) und wenn möglich, per Konfiguration ein- und ausschaltbar.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
chris
Posts: 8
Joined: Thu Jul 15, 2021 3:34 pm

Re: WYSIWYG in Question textbox on initial creation of entry

Post by chris »

Hallo Thorsten,

habe also auf die aktuelle Entwickler-Version upgedatet...

Update tat, Startseite wird angezeigt, beim Klick auf eine FAQ aber auch bei Suche:

phpMyFAQ Fatal error
Uncaught exception: 'TypeError'

Message: 'Argument 1 passed to DOMNode::replaceChild() must be an instance of DOMNode, null given'

Stack trace:

#0 /phpmyfaq/src/libs/erusev/parsedown-extra/ParsedownExtra.php(485): DOMNode->replaceChild(NULL, Object(DOMElement))
#1 /phpmyfaq/src/libs/erusev/parsedown-extra/ParsedownExtra.php(232): ParsedownExtra->processTag('\n\n\n...')
#2 /phpmyfaq/src/libs/erusev/parsedown/Parsedown.php(276): ParsedownExtra->blockMarkupComplete(Array)
#3 /phpmyfaq/src/libs/erusev/parsedown/Parsedown.php(39): Parsedown->lines(Array)
#4 /phpmyfaq/src/libs/erusev/parsedown-extra/ParsedownExtra.php(46): Parsedown->text('...')
#5 /phpmyfaq/src/phpMyFAQ/Helper/FaqHelper.php(156): ParsedownExtra->text('...')
#6 /phpmyfaq/src/phpMyFAQ/Helper/SearchHelper.php(230): phpMyFAQ\Helper\FaqHelper->renderAnswerPreview('...', 25)
#7 /phpmyfaq/search.php(236): phpMyFAQ\Helper\SearchHelper->renderSearchResult(Object(phpMyFAQ\Search\SearchResultSet), 1)
#8 /phpmyfaq/index.php(735): require('/var/www/vhosts...')
#9 {main}
Thrown in '/phpmyfaq/src/libs/erusev/parsedown-extra/ParsedownExtra.php' on line 485

Gruß,

Chris
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: WYSIWYG in Question textbox on initial creation of entry

Post by Thorsten »

Hi,

kann es sein, dass du Markdown aktiv hast?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
chris
Posts: 8
Joined: Thu Jul 15, 2021 3:34 pm

Re: WYSIWYG in Question textbox on initial creation of entry

Post by chris »

Danke ;)
Post Reply