plug-in request: formatting buttons for wiki
Posted: 28 May 2006 09:30 PM   [ Ignore ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1642
Joined  05-13-2004

I would like to have formatting buttons for the wiki. i.e. when linking to a wiki page all I would need to do is highlight the word and click a button to have the double square brackets around that word: i.e

[[some wiki page]]

additionally things like bold, italics, h4, h5, h6 etc…

 Signature 

CreateSean - My journey to pro web designer
currently improving my CSS, XHTML, JQuery & photoshop kung fu skills
I am the poster formally known as The Linguist.

Profile
 
 
Posted: 29 May 2006 07:36 AM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  879
Joined  05-14-2004

its a good request.  although i’m using textile for me formatting it woulfd be helpful for my users if there was a more wysiwyg formatting system.  i’ve not edited a wiki before so i don’t knpw if this is common or not…

Profile
 
 
Posted: 29 May 2006 08:59 AM   [ Ignore ]   [ # 2 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1401
Joined  01-15-2005

It would be nice to have this as an option.  I vote for it.

People usually avoid wikis becaus it looks complicated.

 Signature 

EE Duration Tags | {view_count_total}

Profile
 
 
Posted: 29 May 2006 02:28 PM   [ Ignore ]   [ # 3 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  217
Joined  11-12-2002

If you want to use TinyMCE from Moxie code then it doesn’t really need a plugin:

Just follow the instructions for the Extension by getting it here then

Depending on the template that you are using for the WIKI, open the file (for example) default.php in the default folder (under wiki_themes) then:

Find the line 27 after the meta tags and add the following:

</script>
tinyMCE
.init({mode : 'textareas',  theme: 'advanced', theme_advanced_buttons1:  'bold, italic, bullist, numlist, outdent, indent, undo,redo, link, unlink, cleanup, code, removeformat, formatselect', theme_advanced_buttons2: '',theme_advanced_buttons3: '', theme_advanced_blockformats: 'p,h2,h3,h4',relative_urls: 'false',remove_script_host: 'false', convert_newlines_to_brs: 'false',force_p_newlines: 'true', cleanup_on_startup: 'true'});</script>

Notice the text ‘path to your’ - you need to change to your location of the tiny_mce javascript file.
The settings are mine. You can put all sorts in here but I suggest that you keep it simple.

One more thing: You need to configure the wiki so that ‘any HTML is allowed’, other wise heading tags won’t work.

This is just my first stab at this, so if anyone notices any issues, let me know.

Further recommendation: I suggest that you create your own wiki template and edit that rather than edit the default one.

 Signature 

PageToScreen

Profile
 
 
Posted: 29 May 2006 03:12 PM   [ Ignore ]   [ # 4 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  217
Joined  11-12-2002

back to the drawing board!

All OK but if you want to use the file upload feature in the WIKI then this breaks it. That is to say: you can upload alright but the add tag to the page helper doesn’t work. I can’t see a way round this because it looks as if the Tiny_MCE javascript is creating an instance of the textarea that the EE code doesn’t know about.

Any one got any ideas?

 Signature 

PageToScreen

Profile
 
 
Posted: 01 June 2006 05:53 AM   [ Ignore ]   [ # 5 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  217
Joined  11-12-2002

Anyone out there have any ideas on this:

TinyMCE wysiwig editor hides the actual edit field and puts an iFrame there instead. So, if you want to use TinyMCE in your WIKI then you have a problem when using the add_tag javascript, within the wiki template.

The code looks like this:

function add_tag (ourTag)
{
    
var theField = document.getElementById('article_content');
etc etc:

Now the field named article_content can’t be written to, instead we need to target the iFrame. Is it possible to modify that code above to do this?

 Signature 

PageToScreen

Profile
 
 
Posted: 01 June 2006 08:45 AM   [ Ignore ]   [ # 6 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1642
Joined  05-13-2004

Just for the record, I think the wysiwyg editors are fine, but I’m really only interested in just a few buttons like the plugin for comments but instead for the wiki.

 Signature 

CreateSean - My journey to pro web designer
currently improving my CSS, XHTML, JQuery & photoshop kung fu skills
I am the poster formally known as The Linguist.

Profile
 
 
Posted: 01 June 2006 09:26 AM   [ Ignore ]   [ # 7 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1401
Joined  01-15-2005

Good point, Wiki must remain as simple as posible.

 Signature 

EE Duration Tags | {view_count_total}

Profile
 
 
Posted: 03 June 2006 07:08 AM   [ Ignore ]   [ # 8 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15823
Joined  06-03-2002
Chris Jennings - 01 June 2006 05:53 AM

Anyone out there have any ideas on this:

TinyMCE wysiwig editor hides the actual edit field and puts an iFrame there instead. So, if you want to use TinyMCE in your WIKI then you have a problem when using the add_tag javascript, within the wiki template.

The code looks like this:

function add_tag (ourTag)
{
    
var theField = document.getElementById('article_content');
etc etc:

Now the field named article_content can’t be written to, instead we need to target the iFrame. Is it possible to modify that code above to do this?

As that code is in the Wiki theme files, yes, you can modify it as you see fit.

 Signature 
Profile
MSG
 
 
Posted: 05 July 2006 12:39 AM   [ Ignore ]   [ # 9 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  215
Joined  08-15-2003

So was it established that we COULD use the TinyMCE editor to make our EE wikis WYSIWYG, particularly if we’re not using the file-upload feature?

 Signature 

Woo hoo!  My EE site finally went live as of Monday, January 9, 2006, at 5am PST grin

Profile
 
 
Posted: 09 July 2006 05:13 PM   [ Ignore ]   [ # 10 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  217
Joined  11-12-2002

I got the file upload feature to work by modifying my wiki template and changing the function ‘add_tag’

The only problem with this is that cannot insert an image of file at the cursor but only at the end of the edit text.


function add_tag (ourTag,kind)
{

var txt=document.createTextNode(ourTag);
if(
kind=='file')
    var
para=document.createElement('p');
else
    var
para=document.createElement('div');

para.appendChild(txt);
document.getElementById('mce_editor_0').contentDocument.getElementsByTagName('body')[0].appendChild(para);
}

Hope this helps. My wiki is here but not much in there yet.

 Signature 

PageToScreen

Profile
 
 
Posted: 13 September 2006 12:31 AM   [ Ignore ]   [ # 11 ]  
Lab Assistant
RankRank
Total Posts:  281
Joined  11-22-2002

Adding my support for The Linguist’s request.

I tried pasting the {exp:comment_buttons} tag into the wiki template page.  It shows up OK, but it doesn’t work.  I didn’t think it would, but it was worth a try.

This would be a HUGE help, especially since novices to Wikis have a hard time grasping “surround the text with double brackets to create a new entry/link.”  I get entries surrounded by single brackets, curly brackets, and parens.  A button would eliminate the confusion.

Profile
 
 
Posted: 14 September 2006 04:35 AM   [ Ignore ]   [ # 12 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  144
Joined  07-21-2006

A more lightweight option than TinyMCE exists I believe with WYSIWIKI, a wysiwyg editor designed for wiki use.

 Signature 

// matthanson.net
// twitter

Profile
 
 
Posted: 25 September 2006 03:18 PM   [ Ignore ]   [ # 13 ]  
Summer Student
Total Posts:  21
Joined  08-08-2006

In an attempt to cook up my own formatting buttons, I have found that the name of the form being declared which contains the fields to edit the wiki is encapsulated in the following tag:

{form_declaration:wiki:edit}

does anyone know the name of the form that is declared?  would you care to share that information?

Profile
 
 
Posted: 25 September 2006 05:29 PM   [ Ignore ]   [ # 14 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  768
Joined  03-16-2002
kevin floyd - 25 September 2006 03:18 PM

does anyone know the name of the form that is declared?  would you care to share that information?

Not sure if I understood your request, but looking at the HTML code of a wiki page when editing, I see:

<form id='edit_article_form' method="post" action="..."  >
<
div>
<
input type="hidden" name="XID" value="..." />
<
input type="hidden" name="title" value="index" />
<
input type="hidden" name="editing" value="y" />
</
div>
<
textarea style='width:98%;' name='article_content' id='article_content' cols='90' rows='25' class='textarea'>
...

Just ignore if its not what you are looking for wink

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64877 Total Logged-in Users: 72
Total Topics: 81802 Total Anonymous Users: 41
Total Replies: 439746 Total Guests: 318
Total Posts: 521548    
Members ( View Memberlist )
Newest Members:  dxrsmdanbilly8hrkiliwysso50kexpressoKlaasdarrenstylestravelerjcatoncvadrata