<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Forum posts to 'Extending and hacking'</title>
		<link>http://www.silverstripe.com/extending-hacking-silverstripe-forum/</link>
		

		
		<item>
			<title>Re: Replacing TinyMCE - World of hurt?</title>
			<link>http://www.silverstripe.com/extending-hacking-silverstripe-forum/show/51357?showPost=70645</link>
			<description>Thank you so much :)&lt;br&gt;&lt;br&gt;Posted to: Replacing TinyMCE - World of hurt?</description>
			<pubDate>Tue, 13 May 2008 13:16:38 +1200</pubDate>
			<author>Nick Koirala</author>
			<guid>http://www.silverstripe.com/extending-hacking-silverstripe-forum/show/51357?showPost=70645</guid>
		</item>
		
		<item>
			<title>Re: Replacing TinyMCE - World of hurt?</title>
			<link>http://www.silverstripe.com/extending-hacking-silverstripe-forum/show/51357?showPost=70639</link>
			<description>Use our built-in behaviour class to apply the script.  Put this into a separately-included JS file:&lt;br /&gt;&lt;br /&gt;Behaviour.register({&lt;br /&gt;  'textarea.yourClass' : { &lt;br /&gt;    initialize: function() {&lt;br /&gt;       createHTMLEditor(this.id); // this == the textarea DOM element&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;It will be applied on load, and reapplied on ajax load&lt;br&gt;&lt;br&gt;Posted to: Replacing TinyMCE - World of hurt?</description>
			<pubDate>Tue, 13 May 2008 13:14:00 +1200</pubDate>
			<author>Sam Minnee</author>
			<guid>http://www.silverstripe.com/extending-hacking-silverstripe-forum/show/51357?showPost=70639</guid>
		</item>
		
		<item>
			<title>Re: Replacing TinyMCE - World of hurt?</title>
			<link>http://www.silverstripe.com/extending-hacking-silverstripe-forum/show/51357?showPost=70603</link>
			<description>Ok I'm a little stuck basically my editor integrates with the following concept (in short):&lt;br /&gt;&lt;br /&gt;[code]&lt;br /&gt;&amp;lt;textarea id=&quot;myHTMLArea&quot;&amp;gt;Some content&amp;lt;/textarea&amp;gt;&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;   createHTMLEditor(&quot;myHTMLArea&quot;);&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;[/code]&lt;br /&gt;&lt;br /&gt;This is obviously different to how TinyMCE is implemented in SilverStripe.  Works fine when visiting a page on a full refresh but when selecting a new page the innerHTML obviously changes but the script isn't executed.&lt;br /&gt;&lt;br /&gt;I wrote an additional script to scan for class=&quot;htmlarea&quot; and change that after an AJAX update and it found it but broke the whole page any time I put it anywhere.  Most likely because I was adding it in the wrong place and it seemed to get stuck in a loop somewhere along the lines.&lt;br /&gt;&lt;br /&gt;So, I need to run a  script to change the HTMLArea afters it been updated by AJAX where should I put this so its run after the page has been updated?&lt;br /&gt;&lt;br /&gt;Cheers,&lt;br /&gt;Nick&lt;br /&gt;(Other than that I'm making good progress a full refresh on each page with f5 give me a spanky new editor :) ).&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br&gt;Posted to: Replacing TinyMCE - World of hurt?</description>
			<pubDate>Tue, 13 May 2008 11:43:11 +1200</pubDate>
			<author>Nick Koirala</author>
			<guid>http://www.silverstripe.com/extending-hacking-silverstripe-forum/show/51357?showPost=70603</guid>
		</item>
		
		<item>
			<title>Re: Replacing TinyMCE - World of hurt?</title>
			<link>http://www.silverstripe.com/extending-hacking-silverstripe-forum/show/51357?showPost=54347</link>
			<description>Excellent I'll get stuck into those and may give you all an update on my progress later on.&lt;br /&gt;&lt;br /&gt;Thanks for the detailed information&lt;br /&gt;&lt;br /&gt;Nick&lt;br /&gt;&lt;br&gt;&lt;br&gt;Posted to: Replacing TinyMCE - World of hurt?</description>
			<pubDate>Wed, 09 Apr 2008 14:03:16 +1200</pubDate>
			<author>Nick Koirala</author>
			<guid>http://www.silverstripe.com/extending-hacking-silverstripe-forum/show/51357?showPost=54347</guid>
		</item>
		
		<item>
			<title>Re: Replacing TinyMCE - World of hurt?</title>
			<link>http://www.silverstripe.com/extending-hacking-silverstripe-forum/show/51357?showPost=51534</link>
			<description>There's been a lot of work in creating custom link and image inserters based around TinyMCE.  If you want to use another editor, then you will lose these.&lt;br /&gt;&lt;br /&gt;But apart from that, it should be doable.  However, to get to a satisfactory result, you'll have to muck with a bunch of code in the core packages, which will make it hard to upgrade.&lt;br /&gt;&lt;br /&gt;The place where all this is controlled is HTMLEditorField.  You should be able to edit that class to load your own editor javascript into the system.&lt;br /&gt;&lt;br /&gt;If you stop including the TinyMCE javascript files, you will run into some javascript bugs in the CMS - particularly when you ajax-load a page.  Your best bet is probably to use firebug to see where the code is tripping up, and commenting the TinyMCE-specific stuff out.&lt;br /&gt;&lt;br /&gt;You should update LeftAndMain.php, to use Requirements::javascript() to include your editor's script files.&lt;br /&gt;&lt;br /&gt;You'll also need to remove the WYSIWYG toolbar from the top panel, by editing the .ss templates for the CMS.&lt;br /&gt;&lt;br /&gt;If you would like to make it easier to upgrade in the future, you might want to consider extending the system so that it has a configuration option to choose alternative editor implementations.  Provided the code followed our coding standards, it would be a good candidate for merge into the mainline system - meaning you could continue to upgrade your site.&lt;br&gt;&lt;br&gt;Posted to: Replacing TinyMCE - World of hurt?</description>
			<pubDate>Thu, 03 Apr 2008 21:22:56 +1300</pubDate>
			<author>Sam Minnee</author>
			<guid>http://www.silverstripe.com/extending-hacking-silverstripe-forum/show/51357?showPost=51534</guid>
		</item>
		
		<item>
			<title>Replacing TinyMCE - World of hurt?</title>
			<link>http://www.silverstripe.com/extending-hacking-silverstripe-forum/show/51357</link>
			<description>I would like to replace TinyMCE with a commercial WYSIWYG editor that I have licensed.  This is for a number of reasons including tidier interface, better CSS options, cleaner code output etc.,  &lt;br /&gt;&lt;br /&gt;I was just wanting to know how deeply embedded TinyMCE is.  It is a case of replacing Tiny's scripts with my own and changing the cms code in a couple of places to use the new editor, or has Tiny been heavily customised to work with SilverStripe.&lt;br /&gt;&lt;br /&gt;Obviosuly I can find this out by getting my hands dirty but just an indication before I start of how big the job might be will help prioritise the changes I'm wanting to make :)&lt;br /&gt;&lt;br /&gt;Cheers,&lt;br /&gt;Nick&lt;br /&gt;&lt;br&gt;&lt;br&gt;Posted to: Replacing TinyMCE - World of hurt?</description>
			<pubDate>Thu, 03 Apr 2008 10:56:26 +1300</pubDate>
			<author>Nick Koirala</author>
			<guid>http://www.silverstripe.com/extending-hacking-silverstripe-forum/show/51357</guid>
		</item>
		

	</channel>
</rss>
