plugin:highlight2wiki
Table of Contents
highlight2wiki Plugin
Compatible with DokuWiki
- 2024-02-06 "Kaos" unknown
- 2023-04-04 "Jack Jackrum" yes
- 2022-07-31 "Igor" yes
- 2020-07-29 "Hogfather" unknown
Similar to bookmark2wiki
This plugin was created based on the legacy code of post2wiki.
Installation
External requirements: This plugin requires the following additional components that must be installed separately:
- Tag plugin is required if tag display is needed
- PHP 8 is preferred
- change yourwebsite.com to your dokuwiki host in the javascript bookmarklet script below and add it into your browser bookmark:
javascript:Q=document.selection?document.selection.createRange().text:document.getSelection(); void(window.open(%27https://yourwebsite.com/dokuwiki/doku.php?do=highlight2wiki&te=%27+encodeURIComponent(Q)+%27&ur=%27+ encodeURIComponent(location.href)+%27%27,%27dokuwikiadd%27,%27scrollbars=yes,resizable=yes,toolbars=yes,status=yes%27));
- Install the plugin using the Plugin Manager
Examples/Usage
- This plugin enables you to highlight and save text from articles on any external URL directly to your DokuWiki.
- 4 actions available in the latest version:
- Mark: highlight the selected text and copy the text to the dokuwiki page
- Load: highlight your previous saved text in the wiki
- Tag: mark the selected text as tag (need tag plugin)
- Learn: mask the saved text
Step-by-Step Usage Guide
If you come across an article on a website that contains text you wish to highlight and save to your DokuWiki, follow these steps:
- press the bookmarklet
- Select the text you want to highlight
Syntax
Configuration and Settings
4 parameters set in the configuration page and their default settings
highlight_namespace
(target namespace folder to save highlight)- default: bookmarks:highlight:
title_as_page_name
: check if you want to usetitle of the article as the wiki page name.
Development
Change Log
- 2023-11-29
- v1.9.1
- bugs and errors fix
- 2023-11-23
- v1.9
- allow using title as page name
- the format is title - crc64code
- can be checked in configuration page
- use the powerful Mark.js library as the rear engine!!
- allow more flexible use i.e. to highlight across paragraphs or hyperlinked text
- load pages faster
- 2022-10-30
- v1.6 patch
- bugs fix
- 2022-10-29
- v1.6
- bugs fix
- run without cuRL, so it can be run in dokuwikistick now
- highlight2wiki toolbar put in to bottom for easiler use in smart phone
- 2022-10-28
- v1.5
- During the DokuWiki downtime, I made lots of changes for the script. In version 1.5, updates as follows:
- allow_tags setting was removed due to the inherited problem comes with php-bulit-in strip_tags function.
- style was amended to prevent conflicts with some dokuwiki templates
- new button [revision] was added. Users can use it as a studying tool to mask/unmark the highlighted text
- more websites are now able to highlight, including wikipedia
- 2022-10-24
- v1.4: change script for html manipulation and config
- 2022-10-23
- less is more: removed mouseclick floating menu which conflict with other dokuwiki plugin or javascript
- 2022-10-18
- added login check so that anonymous user cannot access the page
- 2022-10-17
- v1.2: added configuration settings and location of namespace now configurable!
- 2022-10-16
- v1.1: fixed str_contains() problem in old PHP version
- 2022-10-15
- Initial release
Known Bugs and Issues
- Please let me know if you have page that can't be fetched or highlight as some website need special treatment before generating the text especially website that use javascript to generate text or layout intensively.
ToDo/Wish List
FAQ
Discussion
plugin/highlight2wiki.txt · Last modified: 2023-12-31 15:21 by Aleksandr