TinyMCE plugin to make links to a Mahara page

Bug #1520028 reported by Aaron Wells on 2015-11-26
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cecilia Vela Gurovic

Bug Description

Currently if a user wants to put a link to one of their Mahara pages into a TinyMCE area, they have to manually look up the URL and insert it as a hard link. This is similar to the old process we used to have for inserting images. So, it calls for a similar solution.

Similar to the TinyMCE image picker that we have now, it would be good if TinyMCE had a "page/collection" picker. The usage would be something like this:

1. I'm typing in a text box with a TinyMCE editor
2. I click on an icon for this plugin in TinyMCE
3. It opens up a screen in which I can select one of my pages or collections
4. It then inserts a link to that page/collection into the text

Aaron Wells (u-aaronw) wrote :

If possible, it would be nice to store these links in the database not as plain HTML <A> tags, but as some kind of placeholder like {pagelink:35}, and then use a filter to render that into the HTML. That way we might avoid some of the "link rot" problems that can come with hard links. It might also make certain actions during import and export easier as well!

For that matter, taking a similar action for embedded images would also be nice for the same reasons.

Changed in mahara:
assignee: nobody → Cecilia Vela Gurovic (ceciliavg)
status: Confirmed → In Progress

The pages/collections link list was added into the 'link' plugin.
It should only work for a normal user (not if working in staff or admin role).

To test it:
In any tinyMCE editor, click on the icon to insert a link. It will show a window with the fourth field as a list of personal collections/pages

Why should it only work when you are a normal user, Cecilia? I'd expect it to work for every user to choose their personal portfolios. We may leave out group, institution, and site portfolios for the time being, but should allow everyone to select from their own portfolios.

Changed in mahara:
milestone: none → 18.04.0

Or did you mean that you don't have this option in other areas than the personal portfolio? I could see a link list when I'm logged in as site admin when I'm in my personal area.

It should only be used in personal area, not if working as an admin or staff in a group, institution or site area

Reviewed: https://reviews.mahara.org/8303
Committed: https://git.mahara.org/mahara/mahara/commit/13fc2089ed7905aea5938e875c70595654de4805
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 13fc2089ed7905aea5938e875c70595654de4805
Author: Cecilia Vela Gurovic <email address hidden>
Date: Thu Nov 23 15:17:31 2017 +1300

Bug 1520028: Add portfolio links in TinyMCE link plugin

Added a field in the 'link' plugin to add a
URL to a selected personal page or collection. This is
only available in a personal portfolio area, but not a
group, site, or institution area.

Removed from annotation.js duplicated function
already defined in mahara.js

Change-Id: Iccf4c4ca08e142bfd77ab824217cbee5dc35a7bd

Robert Lyon (robertl-9) on 2017-12-08
Changed in mahara:
status: In Progress → Fix Committed
tags: added: nominatedfeature
Robert Lyon (robertl-9) on 2018-04-05
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers