DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:highlight2wiki

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

plugin To highlight any page on the web

Last updated on
2023-11-29
Provides
Action
Repository
Source

Similar to bookmark2wiki

Tagged with bookmark, highlight

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));

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:

  1. read an article
  2. press the bookmarklet
  3. the plugin will retrieve the page and generate a dedicated wiki page for that URL in DokuWiki.
  4. Select the text you want to highlight
  5. press [ Mark ]
  6. the selected text was highlighted.
  7. after reading and highlighting, press save at the bottom of the edit page
  8. the url of the article, your selected text was now saved in the dedicated wiki page with an unique pagename

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

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki