The enhanced editor is quite nice, however it still uses the plain wiki syntax. The WYSIWYG editor (based on Yahoo! User Interface 2) in the Pier-Wysiwyg
add-on is significantly easier to use (left is enhanced, right is WYSIWYG):
PRWysiwygEditorExample register
Then goto http://localhost:8080/wysiwygtest - this should open an example editor.
There are several problems with the WYSIWYG editor in pier however:
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E) Timestamp: Tue, 29 Apr 2014 11:16:35 UTC Message: 'buttons[...].type' is null or not an object Line: 67 Char: 3091 Code: 0 URI: http://localhost:8080/files/PRYUIEditorDeploymentLibrary/yuieditor290.js
It may need to be upgraded to YUI 3, however it has a known issue working on IE8. One work-around for this is to switch the order of the tabs so the wiki editor (non-WYSIWYG) comes up first.
Several problems have been fixed:
*/information@test*
The editor displays the text correctly, but saves it as:
*/information#test*
One possible fix for this is to update PRWysiwygFileLibrary>>parseHtmlToPierWikiSyntaxJs
by adding the else block:
if (url.indexOf("mailto:") == 0) { url = url.substr("mailto:".length); } else { if (url.substr(0, 4) !== "http") { /* Replace # with @ if it is the last word and if it is a non-external link */ url = url.replace("#","@"); }
= line -- with -- lots -- of -- dashes -- and @@ at @@ signs
into:
= line \-\- with \-\- lots \-\- of \-\- dashes \-\- and \@\@ at \@\@ signs
The same javascript method above contains:
var preMarkup = function () { return function (node) { var isCode = false; if (node.className && node.className.indexOf("shout") != -1) { isCode = true; escapeText = false; } var markup = isCode ? "==" : "=";
Removing the class check resolved the issue.
*value:children|link*
then opening an editor on it yields:
MessageNotUnderstood: receiver of "write:" is nil Your request could not be completed. An exception occurred.
This was caused by a missing class - Pier-Wysiwyg-JohnCBorden.89 replaces PRWikiWriter with PRPillarWriter.
PREditorScripts>>toolbarJs
). MessageNotUnderstood: JQTabs>>onSelect:
This was resolved in Pier-Wysiwyg-JohnCBorden.90
by replacing #onSelect:
with #onActivate: