Skip to content

Commit

Permalink
Item10450: BuildContrib leaves $Rev$ tags in topics
Browse files Browse the repository at this point in the history
First the contrib only searched for $Rev:
It appears many files on our SVN are not getting the $Rev$ replace by $Rev: number $
Second. It happens often that people forget to set the Rev to 1.
Now that we do not ship ,v files with many revs we can safely put a 1. This
way we always get a valid rev in the distributed docs
The TinyMCE would not work because it was saved in DOS format


git-svn-id: http://svn.foswiki.org/branches/Release01x01@10963 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
KennethLavrsen authored and KennethLavrsen committed Mar 8, 2011
1 parent 3f03e1b commit b85616a
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 42 deletions.
5 changes: 2 additions & 3 deletions BuildContrib/lib/Foswiki/Contrib/Build.pm
Expand Up @@ -1079,9 +1079,8 @@ sub filter_txt {
sub {
my ( $this, $text ) = @_;

# Replace the SVN revision with rev 1.
# In release builds this gets replaced by latest revision later.
$text =~ s/^(%META:TOPICINFO{.*)\$Rev:.*\$(.*}%)$/${1}1$2/m;
# Replace the version (SVN Rev or wrongly saved number) with rev 1.
$text =~ s/^(%META:TOPICINFO{.*version=").*?(".*}%)$/${1}1$2/m;
$text =~ s/%\$(\w+)%/&_expand($this,$1)/geo;
return $text;
}
Expand Down
78 changes: 39 additions & 39 deletions TinyMCEPlugin/data/System/TinyMCEFrequentlyAskedQuestions.txt
@@ -1,39 +1,39 @@
%META:TOPICINFO{author="ProjectContributor" date="1227770072" format="1.1" version="$Rev$"}%
%META:TOPICPARENT{name="TinyMCEPlugin"}%
---++!! !TinyMCE FAQs
Frequently Asked Questions of the TinyMCEPlugin integration.
%TOC%
---++ Q: The editor takes over the standard edit screen. That's OK, but how do I get access to the old (textarea) editor?
A: Foswiki has a 'Edit Wiki Text' link on most screens that gives you access to the plain text editor, so this question is moot. In addition to this there are three ways to temporarily disable !TinyMCE:
1 Add=;nowysiwyg=1= to the end of the edit URL to disable it for a single edit,
2 =Set NOWYSIWYG = 1= in a web, topic, or personal preferences page to disable the editor for a web, topic or user,
3 =Set WYSIWYG_EXCLUDE= as described in WysiwygPlugin to disable the editor subject to certain content (e.g. Foswiki macros, pure Code.HTML etc) being in the page. This can also be set on a web, topic, or personal basis.
---++ Q: How do I *set* a Foswiki macro inside !TinyMCE?
A:
1 Create a list item using the toolbar button
1 In the list item, type Set NAME = value
1 (Optional) Select the value, and format it using =Protect on save= format.
Step 3 is required if the value contains TML (The special Foswiki syntax called Topic Markup Language), or if you style it e.g. to add bold, or if it's sensitive to the correct number of spaces.
---++ Q: How can I *protect* content from !TinyMCE?
A:
1 Select the content and select the "Protect forever" format. This will add <sticky>..</sticky> tags around the content, which don't interfere with display but do prevent WYSIWYG editors from trying to interpret the content as HTML.
---++ Q: How do I *use* a Foswiki macro inside !TinyMCE?
A: Just type it in. When the topic is saved, what you type will be saved just as you wrote it. If any part of your macro parameters is sensitive to spacing, then select the entire Foswiki macro and assign the ==Protect on save== style to it.
---++ Q: Why doesn't copy-paste work on Internet Explorer?
A: It does, but you have probably got your security settings in IE set up to disable it. In IE got to Tools->Security->Internet->Custom Level->Allow paste operations via script. If this is set to 'Disable', then all internet applications are blocked from pasting using Javascript. Either enable this option, or add your Foswiki site to the list of Tools->Security->Trusted Sites.
---++ Q: Why do all my popups contain raw HTML?
A: You probably have your file extensions set up in Apache so that =.htm= files are treated as plain text. Look through your Apache config (including =.htaccess= for the =pub= directory) for a line that says something like: =AddType text/plain .htm= (probably with a bunch of other extensions). You can either remove =.htm= from that list, or you can add a .htaccess for the pub/System/TinyMCEPlugin directory that contains the line =AddType text/html .htm=
---++ Q: I write Foswiki applications. What is safe to edit?
A: It's impossible to be 100% certain that the use of a WYSIWYG editor will not change existing content such that Foswiki Applications no longer work. The !WysiwygPlugin is set up by default to make it as easy as possible to create new content and import content from other applications. However some Foswiki applications are written such a way that they "just work" - they take silent advantage of the sloppy parser used in TML rendering. Sloppy syntax can break the rules that WYSWYG relies on to be able to interpret TML and present it for editing.
Unfortunately there is no simple way to describe what will, and what won't, work with WYSIWYG. The best tactic is to use the <sticky> tag to protect such content (this tag is automatically applied by the "Protect forever" format).
%META:TOPICINFO{author="ProjectContributor" date="1227770072" format="1.1" version="$Rev$"}%
%META:TOPICPARENT{name="TinyMCEPlugin"}%
---++!! !TinyMCE FAQs

Frequently Asked Questions of the TinyMCEPlugin integration.

%TOC%

---++ Q: The editor takes over the standard edit screen. That's OK, but how do I get access to the old (textarea) editor?
A: Foswiki has a 'Edit Wiki Text' link on most screens that gives you access to the plain text editor, so this question is moot. In addition to this there are three ways to temporarily disable !TinyMCE:
1 Add=;nowysiwyg=1= to the end of the edit URL to disable it for a single edit,
2 =Set NOWYSIWYG = 1= in a web, topic, or personal preferences page to disable the editor for a web, topic or user,
3 =Set WYSIWYG_EXCLUDE= as described in WysiwygPlugin to disable the editor subject to certain content (e.g. Foswiki macros, pure Code.HTML etc) being in the page. This can also be set on a web, topic, or personal basis.

---++ Q: How do I *set* a Foswiki macro inside !TinyMCE?
A:
1 Create a list item using the toolbar button
1 In the list item, type Set NAME = value
1 (Optional) Select the value, and format it using =Protect on save= format.
Step 3 is required if the value contains TML (The special Foswiki syntax called Topic Markup Language), or if you style it e.g. to add bold, or if it's sensitive to the correct number of spaces.

---++ Q: How can I *protect* content from !TinyMCE?
A:
1 Select the content and select the "Protect forever" format. This will add <sticky>..</sticky> tags around the content, which don't interfere with display but do prevent WYSIWYG editors from trying to interpret the content as HTML.

---++ Q: How do I *use* a Foswiki macro inside !TinyMCE?
A: Just type it in. When the topic is saved, what you type will be saved just as you wrote it. If any part of your macro parameters is sensitive to spacing, then select the entire Foswiki macro and assign the ==Protect on save== style to it.

---++ Q: Why doesn't copy-paste work on Internet Explorer?
A: It does, but you have probably got your security settings in IE set up to disable it. In IE got to Tools->Security->Internet->Custom Level->Allow paste operations via script. If this is set to 'Disable', then all internet applications are blocked from pasting using Javascript. Either enable this option, or add your Foswiki site to the list of Tools->Security->Trusted Sites.

---++ Q: Why do all my popups contain raw HTML?
A: You probably have your file extensions set up in Apache so that =.htm= files are treated as plain text. Look through your Apache config (including =.htaccess= for the =pub= directory) for a line that says something like: =AddType text/plain .htm= (probably with a bunch of other extensions). You can either remove =.htm= from that list, or you can add a .htaccess for the pub/System/TinyMCEPlugin directory that contains the line =AddType text/html .htm=

---++ Q: I write Foswiki applications. What is safe to edit?
A: It's impossible to be 100% certain that the use of a WYSIWYG editor will not change existing content such that Foswiki Applications no longer work. The !WysiwygPlugin is set up by default to make it as easy as possible to create new content and import content from other applications. However some Foswiki applications are written such a way that they "just work" - they take silent advantage of the sloppy parser used in TML rendering. Sloppy syntax can break the rules that WYSWYG relies on to be able to interpret TML and present it for editing.

Unfortunately there is no simple way to describe what will, and what won't, work with WYSIWYG. The best tactic is to use the <sticky> tag to protect such content (this tag is automatically applied by the "Protect forever" format).

0 comments on commit b85616a

Please sign in to comment.