Hello,
Is there a way to get the rich text editor that is used when you edit a document embedded into another window?
I want the user to click on an "edit" button and have a screen similar to the document editing appear but have the submit button redirect back to the overview tab instead of the usual wiki/document display tab.
Thanks,
Cassie
Hi Cassie,
There is the Formatted Text widget that has the rich text editor embedded in it. Users can format text when they are customizing their home pages or administrators can use it when customizing the space pages. Does that work for your needs?
As far as submitting to the overview tab, I'm not sure what you mean by that? Are you wanting the submit to happen outside of the personalizing/editing of a page?
Diana
Hi Diana,
The formatted text widget is kind of what I want. However, I don't want the user to have to click customize-->edit to have to change the text. I want the user to click on an edit button I have in a custom widget, be redirected to a page that displays the same editor used (not the widget) in that formatted text widget, or when you edit discussions, documents, etc.
What I meant by redirecting to the homepage is when a user is done editing the selected text, they would click submit, and instead of staying on the current page, it would redirect them back to the overview tab.
I basically just need to know how to get the editor that is used in Clearspace, and how the text is actually read in for when a user would click submit.
Hope that is a better explanation.
Thanks,
Cassie
Hello,
I found out that TinyMCE is used as the rich text editor...so that probably means I need to download that.
How does Clearspace read in the text that is submitted with this tool, or is that some method that the editor has?
Thanks,
Cassie
Hi Cassie,
Glad you found TinyMCE was the rte. We use a Struts action and javascript to get at the submitted text. Probably best to dig into the editor methods, like you already thought of
.
I found this javascript that might help:
var field = document.getElementById("f_content");
field.value = tinyMCE.getContent(tinyMCE.getWindowArg('editor_id'));
field.form.submit();
Hopefully that helps.
Diana
Hi Diana,
Thanks for your quick response!
I am having trouble making the actual editor appear.
This is what I have put on my .ftl file that gets called when I navigate to the page:
<script
language= "javascript" type="text/javascript"src="D:/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript"type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "simple"
});
</script>
<form method="post" action="somepage">
<textarea name="content"style="width:100%">
</textarea>
</form>
When I load the page, I get one of those yellow error images on the left bottom corner of the screen that says 'tinmce.js' does not exist. There seems to be a problem with the script (which I got off the TinyMCE site). I checked the file path I put in "D:/tinymce/..." and that is where I extracted the .zip file. Was there any more code you had to add to make the editor appear?
Thanks,
Cassie
Hi Cassie,
I'd take a look at the tinyMCE directory under resources in the clearspace code:
\clearspace\src\resources\resources\scripts\tiny_mce
Maybe start with this file:
\clearspace\src\resources\resources\scripts\tiny_mce\plugins\fullscreen\fullscreen.htm
It has a render method in it that might help.
Diana
Hi Diana,
This really doesn't help. I have the scripts set up the same way as within that file and the tinyMCE variable is still not found.
Thanks,
Cassie
Hi Cassie,
I'm just going to link this ticket to your other ticket (http://www.jivesoftware.com/community/message/128626) since they sound like they are getting at the same problem. That way we can keep the chat history in one string. Let me know if that's not okay with you.
I did find out that the Formatted Text widget does not use a FTL since it just displays text. I'm looking into other solutions for you. I'll let you know what I find soon....
Diana
Try looking at the status update widget. That takes user input all the time instead of just when you press edit. It uses a regular text field not a rich text, but the logic is probably the same.
Diana
Hi Diana,
I looked at the status update widget. My problem is not the java classes to pull the text in, but more how the ftl works with the tinymce editor. I am able to pull in the text with a regular text field.
Also, it's fine that you link my two tickets, but I think you might have picked the wrong one. The other one I have is http://www.jivesoftware.com/community/thread/33207 .
Thanks,
Cassie
Jive combines collaboration software, community software & social networking software into the leading SBS solution.
© Copyright 2000–2009 Jive Software. All rights reserved.
915 SW Stark St., Suite 400, Portland, OR 97205