Re: [Hypercontent-users] TinyMCE WYSIWYG integration
Brought to you by:
alexvigdor
From: Alex V. <av...@co...> - 2005-12-09 19:16:18
|
Hi John, It's actually server-side code that's stripping those attributes. This came up for Hull with 1.4 as well . . . I'll add a configureable post-processing pipeline for HTML in the overall redesign of the XML/WYSIWYG editor which is starting now, but for a quick short term fix you'll need to tweak some code in org.hypercontent.xml.DocumentFactory starting at line 346, where the accepted elements and attributes are configured for the NekoHTML parser. You might be able to get away with removing the "ElementRemover" filter altogether, since TinyMCE has this capability built-in, but only if TinyMCE will be used for every project. I don't think I mentioned on the wiki, but you should be able to enable TinyMCE in just a single project by putting that "/screens/modal-xml.xsl" file in the project repository rather than the bootstrap repository. To use your css classes in TinyMce, just point it to your css file from your project's copy of the modal-xml.xsl file, e.g.: tinyMCE.init({ mode : "textareas", verify_html : false, urlconverter_callback : "HCconvertURL", cleanup_callback : "HCCleanup", content_css : "<xsl:value-of select="$rel-project-base"/>/design/cucms.css" }); Alex On Dec 9, 2005, at 12:58 PM, John Fereira wrote: > After Alex was kind enough to post a patch to integrate the TinyMCE > WYSIWYG editor (https://clearinghouse.ja-sig.org/wiki/x/UDE) on the > wiki space for hypercontent I thought I'd try it out to see if it > fixed an issue I was having with the original editor. > > Basically, I've got a small xml file that uses a CSS style on a div > element. The site I'm migrating to HC was previously written in > Anakia so I already had pages as xhtml which used Anakia site files > and a css file to style the content. The element looks at follows: > > <div class="section">Documentation</div> > > I set up the project-definition file such that the xml-doc contains > three editors text, upload, xml (in that order). > > When I select Edit on the file the content shows up with the div > element intact. When I select the XML editor, it is removing the > class="section" attribute. It appears that in TinyMCE that it can > apply styles (it has a --Styles-- drop down menu) but it doesn't > provide any style options. > > The behavior of removing the class attribute existed in the original > WYSIWYG editor as well. Two questions: > > Is there someway to turn off the behavior which appears to be removing > class attribute when it *reads* the document into the editor? > > Can the TinyMCE editor be configured to read in a css file so that I > can use css to style the content rather than options using the > Bolding/Heading buttons? > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > Hypercontent-users mailing list > Hyp...@li... > https://lists.sourceforge.net/lists/listinfo/hypercontent-users > |