====== highlight2wiki Plugin ====== ---- plugin ---- description: To highlight any page on the web author : dodotori #@dokuwiki forum email : dodotori@localhost type : action lastupdate : 2023-11-29 compatible : Jack Jackrum,Igor depends : conflicts : similar : bookmark2wiki tags : highlight, bookmark, version : 1.9.1 downloadurl: https://github.com/edwardcodelab/highlight2wiki/zipball/master bugtracker : https://github.com/edwardcodelab/highlight2wiki/issues sourcerepo : https://github.com/edwardcodelab/highlight2wiki/ donationurl: screenshot_img : ---- This plugin was created based on the legacy code of [[tips:weblog_bookmarklet|post2wiki]]. ===== Installation ===== :!: **External requirements:** This plugin requires the following additional components that must be installed separately: * [[plugin:tag|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)); {{https://i.imgur.com/qjPhi8T.png}} * Install the plugin using the [[plugin:plugin|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: - read an article \\ {{https://i.imgur.com/Fibhxsz.png}} - press the bookmarklet - the plugin will retrieve the page and generate a dedicated wiki page for that URL in DokuWiki.\\ {{https://i.imgur.com/yLjaTyv.png}} - Select the text you want to highlight - press [ Mark ] \\ {{https://i.imgur.com/Ndjyej3.png}} - the selected text was highlighted. \\ {{https://i.imgur.com/OVHm927.png}} - after reading and highlighting, press save at the bottom of the edit page \\ {{https://i.imgur.com/MDSEVHn.png}} - the url of the article, your selected text was now saved in the dedicated wiki page with an unique pagename \\ {{https://i.imgur.com/zizESOG.png}} ===== 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 =====