Home » Topics » Pods 1.x » Visual Editor > not correct xhtml
Visual Editor > not correct xhtml
This topic contains 11 replies, has 7 voices, and was last updated by sc0ttkclark 2 years, 8 months ago.
-
AuthorPosts
-
November 26, 2009 at 11:43 am #160859
Try referencing this for a fix:
December 3, 2009 at 6:26 pm #160860hi scott,
no. i´m not hard-coding anything into core due to the update-stuff. currently i´m trying to preg_replace the whole stuff. my only problem is, that i don´t know how to bring < and > into preg_replace… (have the same problem at the menu too). i´m no php-genius. i´m normally just doing graphic and css-stuff. so: sry for all my questions. i´m trying to solve as many as possible myself, but < and > is just too much into detail. maybe you can lend a helping hand.
ps. i think i pushed the other thread much too far into a visual editor discussion, so i think this should stay here for doc purpose.
December 5, 2009 at 9:52 am #160861The <br /> fix will be released along with 1.7.9.
February 1, 2010 at 3:17 pm #160862I’m using version 1.8.1 and the problem still seems to be there, I’ve got <br> tags all over the place and hardly any of my content will validate as xhtml. What can be done?
February 2, 2010 at 8:49 am #160863Re-download nicEdit (http://nicedit.com/download.php) with the nicXHTML component compiled into it.
February 3, 2010 at 3:22 am #160864Thanks, I didn’t know that was there. However since I installed that the menu bar on the editor doesn’t work. I noticed there was a link to iconPath in the js file but even when I put the gif file in the correct place the menu bar still doesn’t seem to want to work … I will investigate.
February 21, 2010 at 7:13 am #160858hi,
i just took a look at my db and found the visual editor adding <br> at the end of every text i add (without hitting [enter] at the end of the text. that´s not appreciated and maybe could be avoided through a filter, but there´s a second problem: xhtml must have closed tags: <br /> instead of <br>.
February 21, 2010 at 7:13 am #160865I have tried following all of the advice in this post and in http://pods.uproot.us/forums/general-discussion/222
Could someone please post a decent pre-save helper for removing all instances of "<br>" before the content is saved to the database?
May 6, 2010 at 2:04 pm #160866I too have tried everything mentioned in all threads related to invalid xhtml generated via nicEdit, with NO LUCK AT ALL!
As holding your breath for a pods release employing tinyMCE is likely to make you blue… I have opted for the following work around.
1. add the following to functions.php in your theme
<pre>
function tidyNicEdit($html)
{ $config = array(
‘clean’=> true,
‘drop-proprietary-attributes’ => true,
‘output-xhtml’ => true,
‘show-body-only’=>true,
‘word-2000′ => true,
‘wrap’ => ’0′
);
$tidy = new tidy();
$tidy->parseString($html, $config, ‘utf8′);
$tidy->cleanRepair();
return tidy_get_output($tidy);
}
</pre>
2. call your desc fields as follows:
<pre>
$description = tidyNicEdit($my_pod->get_field(‘description’));
</pre>…and that seems to do the trick.
September 15, 2010 at 7:39 pm #160867September 16, 2010 at 11:26 am #160868I just came across this Input Helper "TinyMCE for Paragraph Text" by jonathandchr. It worked like a charm for me all html is clean. Hope this helps someone too.
http://podscms.org/packages/tinymce-for-paragraph-text/
Steps/Tutorial:
http://mondaybynoon.com/2010/03/30/upgrading-pods-to-use-tinymce-instead-of-nicedit/
September 16, 2010 at 6:04 pm #160869Actually that package has been replaced with a more full version: http://podscms.org/packages/tinymce-for-pods/
-
AuthorPosts
You must be logged in to reply to this topic.