You are not logged in.
Toggle default Textile setting for excerpts.
Last edited by Mary (2006-11-15 15:49:33)
Offline
Handy little plugin, thanks.
Offline
Nice plug-in!
I asked <a href=“http://forum.textpattern.com/viewtopic.php?pid=82845”>how to disable Textile per article by default, but also keep “Use Textile” enabled in Site Preferences</a>.
Then, <a href=“http://forum.textpattern.com/profile.php?id=1327”>doggiez</a> suggested me to use and modify this plug-in. So, I did it! (i’m so happy)
The changes I made are:
<p>After:<br><code>echo n.’<script type=“text/javascript”>document.article.textile_excerpt.checked = false;</script>’;</code>
I added:<br><code>echo n.’<script type=“text/javascript”>document.article.textile_body.checked = false;</script></code>’;</p>
Now, Textile is off in both body article and excerpt, but I can keep the “text”, “html” and “preview” tabs (that was what I was looking for).
Maybe, Mary can release a new version of this plugin with that change (but it wouldnt make sense with the name of the plug-in, that is “textile_excerpt_off”, and my change turn off textile in both article and excerpt).
Or maybe, Mary can help this poor kid (me) to release “mnq_textile_off”, <a href=“http://forum.textpattern.com/viewtopic.php?pid=82845#p82845”>his first (and probably unique) plug-in of his life</a>! :D
Last edited by maniqui (2005-10-26 16:40:58)
Offline
Textpattern version 4.0.2 (should be out in a week) changes how this works.
For those who haven’t seen this version in development, it is now two different dropdown menus, each containing the three choices to format text (as in the admin prefs). The admin pref now defines what the default selection is, but every article remembers the setting you chose for that individual article, including if excerpt is differently formatted than the article.
The only reason for my plugin would be to have it pre-select something different for the excerpt, but I’m thinking it makes more sense for me (or someone) to send in a patch to add a second preference for that. Why have a plugin when its better to complete the default setup? :) What do you guys think?
Offline
<blockquote>
The admin pref now defines what the default selection is, but every article remembers the setting you chose for that individual article, including if excerpt is differently formatted than the article. </blockquote>
Does this mean that even if I select to have it disabled by default (in admin prefs) I will still see the text/html/preview subtabs?
If answer is “no”, then I will keep using your plug-in (modded), and enable Textile (globally, in admin prefs) but disabled by the plug-in in each article.
But here is the critic
<blockquote>Why have a plugin when its better to complete the default setup? :) What do you guys think?</blockquote>
I think there should be an option to “Show text/html/preview subtabs (yes/no)”.
Right now, that option is merged with “Use Textile” (if enabled).
I mean, if I use Textile, the subtabs are showed; if I dont use Textile, they wont be showed.
That makes no sense for me, because I want to keep those subtabs even when I have Textile disabled.
Last, an idea:
in the <em>ideal world</em>, by using HTML Tidy extension for Firefox and having “0 errors / 0 warnings” in Write tab (actually, it show 22 warnings for me, and 1 error <strong style=“text-decoration:underline”><code><p1></code></strong> when in “preview” subtab), the “Preview” sub tab (combined with HTML Tidy extension) could be used as a tool for finding HTML warnings/errors in our articles.
But for that, the warnings/errors in Write subtab should be fixed. What do you think? ;)
Offline
> Otherwise, what you see in your textarea is what you get.
No mary, I think you are wrong:
what I see in the textarea is HTML (that I typed in), and it is not what I get.
What I get can be viewed in the Preview subtab, and that is: the parsed HTML.
I would like to keep typing HTML and keeping the preview tab.
For example:
I’m right now copying and pasting (and typing) some HTML tables (with tabular data, of course) in the textarea.
I have Textile disabled (enabled globally, and disabled in article), but I would like to have my Preview Tab to see that the tables are well-coded.
And the Preview tab is there (but only because Textile is globally enabled).
Last edited by maniqui (2005-10-27 22:42:54)
Offline
Now that I understand what you’re saying, we’re talking about two different things. It is what you get – as in, not monkeyed with by someone else (Textile) – just not re-escaped in the textarea for editing. I didn’t mean the same as in like a wysiwyg program’s “design” mode (or whatever its called).
Originally (way back) I think they were all there regardless, not sure when the change happened. I think somewhere between g.1.19 and RC1, but I really can’t be certain when or why. You might be able to find something on it in an old forum post perhaps. At a guess I’d say because the thought just hadn’t occured to sit down and figure out which view buttons should be viewable when.
It is simple enough to fix/adjust though. As I said, why have a plugin when its better to complete the default setup?
Offline
Aaaaah, ok, ok. Now we are hearing the same radio station!
I hope the option to view the write “html/preview” subtabs in future versions will be separated from the Use textile option, in a “Show text/html/preview subtabs (yes/no)”
Should I add this as a Feature Request?
Offline
I’ll make these tabs “smarter” in the facelift I’m working on, but you can certainly request this feature. You may find out why it was changed too, maybe there’s a real reason for it.
Offline