PHP Classes

Missing Puzzle Piece

Recommend this page to a friend!

      PHP Widget Library for HTML Pages  >  All threads  >  Missing Puzzle Piece  >  (Un) Subscribe thread alerts  
Subject:Missing Puzzle Piece
Summary:Needs Importer
Messages:3
Author:Kenneth Brown
Date:2021-08-22 15:16:54
 

  1. Missing Puzzle Piece   Reply   Report abuse  
Picture of Kenneth Brown Kenneth Brown - 2021-08-22 15:16:54
Be sure to acquire the Importer package - it's needed to run test.php, which is really the only useful documentation / example. Otherwise, the Widget Library looks great!

  2. Re: Missing Puzzle Piece   Reply   Report abuse  
Picture of Nikos M. Nikos M. - 2021-08-23 11:20:03 - In reply to message 1 from Kenneth Brown
HtmlWidget needs some way to enqueue the needed assets required by some widgets, eg tinymce, codemirror,..

I have such a library ready called Importer, but htmlWidget is really agnostic regarding that, someone may use her custom enqeuer, HtmlWidget won't mind at all, as long as it can handle these things and:

1. 'scripts' type a script tag with src attribute to given asset link
2. 'styles' type a link type "text/css" tag with href to given asset link
3. 'scripts' type where asset is an array containing inline code, then script tag with the inline code
4. 'styles' type where asset is array of inline code, then a 'style' tag with the inline code
5. 'scripts-composite' is really an array of individual 'scripts' type (either link or inline)
6. 'styles-composite' is really an array of individual 'styles' type (either link or inline).

If your custom enqueer can handle these along with any dependencies they might have. It is super. HtmlWidget won't care who hanmdles it, or even whether it is handled at all.

That being said Importer is a really useful solution which can handle all that and even more and it is really light-weight.

  3. Re: Missing Puzzle Piece   Reply   Report abuse  
Picture of Nikos M. Nikos M. - 2021-08-23 11:23:44 - In reply to message 1 from Kenneth Brown
Regarding documentation:

I am of the opinion that detailed usage examples are the best documentation in action.

However since htmlWidget really started with a lot more widgets (almost 2 times as many) and time was invested in making everything work, documentation is lacking, but really it is straight forward in most cases.