npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

aw_wys

v2.0.3

Published

Componente wysiwyg para Polymer 3

Readme

AW-WYS

Componente wysiwyg desarrollado en Polymer 3 por Arisman Webs. Este componente te permite crear un editor de texto de forma para añadir a la web. Del mismo modo, va completamente enlazado con los aw-form y es de un uso muy sencillo.

Docs.: AW-WYS - Arisman Webs

Este componente crea un editor de texto <i>wysiwyg</i> para poder introducir texto con formato en la web. Para añadir este campo:<script type="module" src="/node_modules/aw_wys/aw-wys.js"></script><aw-wys></aw-wys>Los parámetros que admite el componeten son:<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">id</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: ID del componente.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">name</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Nombre del compoente.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">placeholder</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Placeholder del componente.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">options</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opciones que queremos disponibles en el editor.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">required</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Si es obligatorio rellenarlo al enviar el formulario.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">novalidate</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Evitar la validación del componente.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">validateonchange</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Valida el campo cuando cambia.Añadir opciones al editorEl componente se puede configurar para que muestre las opciones que queramos ordenadas como queramos. Las opciones disponibles son:<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">bold</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción de poner en negrita.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">italic</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción de poner en cursiba.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">underline</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción de subrayar el texto.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">strikeThrough</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción de tachar el texto.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">removeFormat</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción de remover el formato.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">justifyLeft</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción de alinear el texto a la izquierda.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">justifyCenter</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción de alinear el texto al centro.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">justifyRight</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción de alinear el texto a la derecha.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">justifyFull</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción de justificar el texto.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">addLink</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción para añadir un enlace.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">addImage</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción para añadir una imagen.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">addVideo</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción para añadir un vídeo.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">addLine</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción para añadir una línea separadora.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">heads</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción para añadir cabeceras.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">cut</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción para cortar texto.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">copy</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción para copiar texto.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">paste</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción para pegar texto.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">undo</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción para deshacer.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">redo</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción para rehacer.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">insertUnorderedList</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción inertar una lista punteada.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">insertOrderedList</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción para insertar un alista numerada.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">formatBlock</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción para insertar un bloque de texto.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">fontFamily</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción para elegirla fuente.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">fontSize</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción para elegir el tamaño de la fuente.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">fontColor</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción para elegir color de la fuente.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">backColor</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción para elegir el color del fondo de la fuente.<b style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">code</b><span style="color: var(--aw-wys-color,#333333); (--aw-wys-font-family,&quot;arial&quot;);">: Opción para ver el código HTML creado.Por defecto el edito se crea con todas las opciones. Para configurarlas tan solo hay que añadir las opciones que queramos separadas por comas (<b>,</b>) y por slash (<b>|</b>) para crear bloques entre las opciones.<aw-wys options="bold,italic,underline|justifyLeft,justifyCenter,justifyRight"></aw-wys>En el ejemplo superior se creará un editor con las opciones de negrita, cursiva, subrayar el texto en un bloque y alinear el texto a la izquierda, centro y derecha en otro bloque.Añadir un value al cargar el editorSi queremos que el editor tenga un texto desde el inicio, tan solo tenemos que introducirlo en el interio de la etiqueta en lugar de hacer con el atributo <b>value</b>:<aw-wys name="textarea"> <h1>Este es el texto por defecto que aparecerá en el editor.</h1></aw-wys>Subir imágnes desde el editor al servidor.Obviamente si queremos añadir imágenes al editor debemos completar cierta configuración para crear una conexión <i>ftp</i>. Para ello tendremos que dirigirnos al siguiente archivo: <i><font color="#3d85c6">/node_modules/aw_wys/scripts/ftp_connect.php</font></i>. En ese archivo tan solo tenemos que añadir el usuario FTP y la contraseña de conexión si esta es necesaria.if ( $_SERVER['REMOTE_ADDR'] == "127.0.0.1" ) { $c_ftp = ftp_connect( "127.0.0.1" ); if( $c_ftp ) { $u_ftp= ftp_login( $c_ftp, "web_arisman", "" ); ftp_pasv( $c_ftp, true ); }} else { $c_ftp = ftp_connect( $_SERVER['SERVER_NAME'] ); if( $c_ftp ) { $u_ftp= ftp_login( $c_ftp, "usuario_ftp", "pass_ftp" ); ftp_pasv( $c_ftp, true ); }}Tan solo hay que cambiar el usuario_ftp por el usuario y el pass_ftp por la contraseña FTP y ya se podrán subir imágenes del editor.Por defecto las imágnes se subirán a la siguiente ruta: <i><font color="#3d85c6">/img/awwys/galery/</font></i>. Si queremos cambiar la ruta a la que se suban las imágenes tan solo hay que configurar estas líneas:$path = "";while( !file_exists( $path . "node_modules/aw_wys" )) {    $path .= "../";}if( !file_exists( $path . "img" )) {    mkdir( $path . "img", 0777 );}if( !file_exists( $path . "img/awwys" )) {    mkdir( $path . "img/awwys", 0777 );}if( !file_exists( $path . "img/awwys/galery" )) {    mkdir( $path . "img/awwys/galery", 0777 );}$path .= "img/awwys/galery/";