Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option for enable HTML in descriptions, including WYSIWYG #128

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BmdOnline
Copy link

Editeur WYSIWYG

J'ai testé 3 éditeurs différents :

  • NicEdit : n'est plus mis à jour. Souci de couleur de fond, il faudrait revoir le CSS.
  • CKEditor : performant mais plus compliqué à mettre en œuvre.
  • TinyMCE : comparable à ckeditor, plus simple à mettre en œuvre.

J'ai finalement retenu TinyMCE.

Principe

Une variable disablehtml servira à désactiver l'affichage HTML et
l'édition WYSIWYG.
Cette variable est basé sur le même principe que la variable
disablejquery.

  1. Créer ou modifier le fichier data/options.php, pour y ajouter :
<?php
$GLOBALS['disablehtml']=false;
?>
  1. Créer ou modifier le fichier inc/user.css, pour y ajouter :
/* CSS Stylsheet for Shaarli -
http://sebsauvage.net/wiki/doku.php?id=php:shaarli */
strong{font-weight: bold}
blockquote{margin-left: 50px;}

Editeur WYSIWYG

J'ai testé 3 éditeurs différents :
- NicEdit : n'est plus mis à jour. Souci de couleur de fond, il faudrait
revoir le CSS.
- CKEditor : performant mais plus compliqué à mettre en œuvre.
- TinyMCE : comparable à ckeditor, plus simple à mettre en œuvre.

J'ai donc retenu TinyMCE.

Principe

Une variable disablehtml servira à désactiver l'affichage HTML et
l'édition WYSIWYG.
Cette variable est basé sur le même principe que la variable
disablejquery.

Créer ou modifier le fichier data/options.php, pour y ajouter :
<?php
$GLOBALS['disablehtml']=false;
?>

Créer ou modifier le fichier inc/user.css, pour y ajouter :
/* CSS Stylsheet for Shaarli -
http://sebsauvage.net/wiki/doku.php?id=php:shaarli */

strong{font-weight: bold}
blockquote{margin-left: 50px;}
@nodiscc
Copy link

nodiscc commented Nov 26, 2014

for reference, the only changed files (aside from adding TinyMCE) are in:

  • inc/user.sample.css
  • index.php
  • tpl/page.footer.html

This is a candidate for the plugin system at shaarli#14. Implementation proposal at shaarli#52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants