joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

[4.2] [new feature] TinyMce sample text plugin

Open brianteeman opened this issue 3 years ago • 26 comments

This is a toolbar icon for the tinymce editor that will let you quickly generate some placeholder text in your content.

To test

  1. Apply pr
  2. rebuild the js with npm run build:js
  3. Go to the tinymce plugin and drag the new icon to your toolbar
  4. Go to any article and try it yourself

image

Note

The text is pretty meaningless. It only exists to avoid the red squiggly lines that you get with browser spellchecks on loremipsum

the sample texts are all language strings so they can be replaced with other text depending on the language. They are all marked ; This is sample text not to be directly translated.

brianteeman avatar Feb 08 '22 23:02 brianteeman

This is a toolbar icon for the tinymce editor that will let you quickly generate a placeholder image in your content.

@brianteeman Copy and paste remainder?

richard67 avatar Feb 08 '22 23:02 richard67

See my comments in #36968. Same can be applied here as well.

laoneo avatar Feb 14 '22 08:02 laoneo

and see my response. Developers need to stop making features that only another developer can use and start to accept that they are not the only users of joomla and not to block useful functionality. Joomla has far too many unfinished core components

brianteeman avatar Feb 14 '22 08:02 brianteeman

I have tested this item :white_check_mark: successfully on eabaa9f16f8d1db5c55d8444a45d7fdc63af6890

Nice feature! I get the discussion if it should be in core or not. But Joomla is build for the user, so we have to make it as much fun as possible!


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

RickR2H avatar Apr 22 '22 14:04 RickR2H

please pardon my ignorance, im trying to figure out how to test this. just learned how to test things yesterday, but i dont understand the "Apply pr" - how do i apply pr? and to "rebuild the js with npm run build:js" i'll need to do this on a local build if i dont have console access on the server?


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

SumCompanyInc avatar Apr 23 '22 18:04 SumCompanyInc

@SumCompanyInc "Apply PR" just means apply the changes from the pull request (PR) here. This could be done e.g. with the patchtester.

But that will not be enough in this case because the PR changes javascript, which needs then to be processed, e.g. transpiled and minified, that's the "rebuild the js with npm run build:js". This step requires to have a development environment, i.e. a git clone of this repository here, with composer and npm software installed. How such an environment can be set up and how npm can be used to rebuild js or css is described here: https://docs.joomla.org/J4.x:Setting_Up_Your_Local_Environment .

Unfortunately that's too complicated for most testers.

But there is another way: If you have a local webserver and database or some webspace and database at a hosting provider where you can use e.g. a subdomain or a subfolder, you can use installation packages or update packages which include all changes from this PR and also the re-compiled js and css. How this can be done is described at this page in a section "Prebuild packages": https://docs.joomla.org/Testing_Joomla!_patches .

On the last mentioned site at the bottom are also a few YouTube videos about patch testing which might be helpful.

richard67 avatar Apr 23 '22 18:04 richard67

thank you @richard67 ! - I am going to deep dive this, and keep trying.


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

SumCompanyInc avatar Apr 25 '22 13:04 SumCompanyInc

Hi @richard67 or @RickR2H I saw yall at the jday user bugs friday.. im still deep diving this. I was able to complete all the steps on this: https://docs.joomla.org/J4.x:Setting_Up_Your_Local_Environment I have composer and npm etc all working it appears, i got done with all the steps. only thing now.. what next to test? i could not bring into the web browser, so i put the folder into my MAMP to try to serve the page. i did also npm run test, that passed.

i essentially see kind of a joomla folder, but i did not see a configuration file, it took me to the installation/index.php, but said there was an error, server returned 500..

after all the stuff.. am i suppose to run an install from the git clone and branch?


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

SumCompanyInc avatar Apr 25 '22 18:04 SumCompanyInc

@richard67 @RickR2H - I think I found my error. I ran the composer update which the doc said not to.. i can install now.. im able to move forward thank you!


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

SumCompanyInc avatar Apr 25 '22 19:04 SumCompanyInc

I have tested this item :red_circle: unsuccessfully on eabaa9f16f8d1db5c55d8444a45d7fdc63af6890

sadly, after some amount of work learning how to test this, i believe i did everything right, but it tested unsuccessfully for me.. i will attempt to test other patches now: https://snipboard.io/paHIy3.jpg


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

SumCompanyInc avatar Apr 25 '22 19:04 SumCompanyInc

@SumCompanyInc What did not work for you? You should not post a negative test result without any information about what had failed, what your result was.

richard67 avatar Apr 25 '22 19:04 richard67

the tinymce was blank after PR https://snipboard.io/paHIy3.jpg


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

SumCompanyInc avatar Apr 25 '22 19:04 SumCompanyInc

How have you applied the pull request? Have you used patchtester? In this case it needs to run npm ci again after the patch was applied. Or have you used the prebuilt packages linked at the bottom of the pull request in the checks?

If you are not sure whether you have done all right, then I suggest you change your test result to „I have not tested this item“.

richard67 avatar Apr 25 '22 19:04 richard67

I have not tested this item.


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

SumCompanyInc avatar Apr 25 '22 20:04 SumCompanyInc

apologies - total newb here: i applied the pull request using the patch tester, and i rebuilt the js with npm run build:js

when i go back into the article, the description area shows up blank

when i ran nmp ci again now.. joomla has completely broken with no styling now.. i ran again npm run:build:css and npm run build:js with no success on fixing joomla.. do you know what may have happened here?


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

SumCompanyInc avatar Apr 25 '22 20:04 SumCompanyInc

@SumCompanyInc Hard to say what‘s wrong … I‘d need to have a look on your environment to get an idea. Maybe someone else has a clue.

richard67 avatar Apr 25 '22 20:04 richard67

i've tried for a second time rebuilding from scratch the entire process. i cloned the joomla github project, branched to 4.2-dev (4.2.0-alpha2-dev), ran composer install (using --ignore-platform-reqs) <- could be the problem? , ran npm ci.. then installed joomla, created article (toolbar fine), installed the patch tester plugin, input github token, fetched patches, applied patch 36975, ran npm run build:js, went to plugins -> tinyMCE, added 'placeholder' to the toolbar, went into article , and nothing showed for tinymce or description area. went back to patch tester and reverted patch, and went back to article, it came up fine again. thats all i know to do . i suppose i will try other patches.


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

SumCompanyInc avatar Apr 25 '22 21:04 SumCompanyInc

@SumCompanyInc According to your description you did nothing wrong.

richard67 avatar Apr 25 '22 22:04 richard67

Please look in your browser console. There will be a javascript error. What is it?

brianteeman avatar Apr 26 '22 06:04 brianteeman

hi @brianteeman - thanks .

my console error says this:

Uncaught TypeError: Cannot read properties of null (reading 'prefix') at Object.d [as load] (tinymce.min.js?402b3fdd69769048b3229b204f544db1:9:100187) at Object. (tinymce.min.js?402b3fdd69769048b3229b204f544db1:9:344454) at Object.ce [as each] (tinymce.min.js?402b3fdd69769048b3229b204f544db1:9:4731) at o (tinymce.min.js?402b3fdd69769048b3229b204f544db1:9:344401) at Object.e [as waitFor] (tinymce.min.js?402b3fdd69769048b3229b204f544db1:9:100056) at nu. (tinymce.min.js?402b3fdd69769048b3229b204f544db1:9:345232) at Array. (tinymce.min.js?402b3fdd69769048b3229b204f544db1:9:98435) at ce (tinymce.min.js?402b3fdd69769048b3229b204f544db1:9:4670) at u (tinymce.min.js?402b3fdd69769048b3229b204f544db1:9:98381) at tinymce.min.js?402b3fdd69769048b3229b204f544db1:9:98197

d	@	tinymce.min.js?402b3…8b3229b204f544db1:9

(anonymous) @ tinymce.min.js?402b3…8b3229b204f544db1:9 ce @ tinymce.min.js?402b3…8b3229b204f544db1:9 o @ tinymce.min.js?402b3…8b3229b204f544db1:9 e @ tinymce.min.js?402b3…8b3229b204f544db1:9 (anonymous) @ tinymce.min.js?402b3…8b3229b204f544db1:9 (anonymous) @ tinymce.min.js?402b3…8b3229b204f544db1:9 ce @ tinymce.min.js?402b3…8b3229b204f544db1:9 u @ tinymce.min.js?402b3…8b3229b204f544db1:9 (anonymous) @ tinymce.min.js?402b3…8b3229b204f544db1:9 a.onload @ tinymce.min.js?402b3…8b3229b204f544db1:9 load (async) nu.loadScript @ tinymce.min.js?402b3…8b3229b204f544db1:9 (anonymous) @ tinymce.min.js?402b3…8b3229b204f544db1:9 ce @ tinymce.min.js?402b3…8b3229b204f544db1:9 u @ tinymce.min.js?402b3…8b3229b204f544db1:9 nu.loadScripts @ tinymce.min.js?402b3…8b3229b204f544db1:9 nu.loadQueue @ tinymce.min.js?402b3…8b3229b204f544db1:9 N1 @ tinymce.min.js?402b3…8b3229b204f544db1:9 (anonymous) @ tinymce.min.js?402b3…8b3229b204f544db1:9 _x.render @ tinymce.min.js?402b3…8b3229b204f544db1:9 a @ tinymce.min.js?402b3…8b3229b204f544db1:9 ui.executeHandlers @ tinymce.min.js?402b3…8b3229b204f544db1:9 o @ tinymce.min.js?402b3…8b3229b204f544db1:9 r @ tinymce.min.js?402b3…8b3229b204f544db1:9 (anonymous) @ tinymce.min.js?402b3…8b3229b204f544db1:9 ui.bind @ tinymce.min.js?402b3…8b3229b204f544db1:9 V @ tinymce.min.js?402b3…8b3229b204f544db1:9 (anonymous) @ tinymce.min.js?402b3…8b3229b204f544db1:9 _x.render @ tinymce.min.js?402b3…8b3229b204f544db1:9 setupEditor @ tinymce.min.js?402b3…8b3229b204f544db1:1 (anonymous) @ tinymce.min.js?402b3…8b3229b204f544db1:1 setupEditors @ tinymce.min.js?402b3…8b3229b204f544db1:1 (anonymous) @ tinymce.min.js?402b3…8b3229b204f544db1:1


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

SumCompanyInc avatar Apr 27 '22 01:04 SumCompanyInc

I just rechecked this pr on two different servers and it worked as intended with no error

brianteeman avatar Apr 29 '22 21:04 brianteeman

Is it necessary to have 2 paragraph options?

Quy avatar Apr 30 '22 21:04 Quy

there was a reason but three months later i dont remember

brianteeman avatar Apr 30 '22 21:04 brianteeman

Closed due to lack of interest from the release lead

brianteeman avatar May 30 '22 15:05 brianteeman

re-opening. this is far more useful to users than other features being added to 4.2 and does not already have an extension offering this on the jed

brianteeman avatar Jun 12 '22 19:06 brianteeman

This pull requests has been automatically converted to the PSR-12 coding standard.

joomla-bot avatar Jun 27 '22 21:06 joomla-bot

Is it necessary to have 2 paragraph options?

Found the reason. The first inserts 1 paragraph, the second inserts 2. The label needs to be corrected

brianteeman avatar Jan 17 '23 17:01 brianteeman

This pull request has been automatically rebased to 5.0-dev.

HLeithner avatar May 02 '23 16:05 HLeithner

The PR was created for Joomla 4.2 using tinymce 5. @HLeithner changed this to be for 5.0 but as that uses tinymce 6 and a reworked plugin tbh I wouldnt expect this to work at all.

brianteeman avatar Aug 26 '23 19:08 brianteeman

tinymce has a template system for such cases. Don't think that adding more buttons is a good thing and since it's for tinymce 5 I'm closing this if ok for you.

HLeithner avatar Sep 03 '23 08:09 HLeithner