In order to keep the entry code as clean as possible, I would like to remove options like "font-size" for when you are editing entries to provent other users from using features I don't want them to use.
I cannot find where "Format Block" is populated (It contains values like: Heading 3/4/5/6, Formatted, Code, Normal, and Address). I found something similar in /admin/record.edit.php, but it isn't it.
Thanks for any insight...
WYSIWYG Editor, Populating Controls
Moderator: Thorsten
Re: WYSIWYG Editor, Populating Controls
Hi,
and the lines below the quoted one.
please, take a look at admin/footer.php:jaytoox wrote:I cannot find where "Format Block" is populated (It contains values like: Heading 3/4/5/6, Formatted, Code, Normal, and Address). I found something similar in /admin/record.edit.php, but it isn't it.
Code: Select all
...
config.toolbar = [ [ "fontname", "space", "fontsize", "space", "formatblock", "space", "bold", "italic", "underline", "strikethrough", "separator", "subscript", "superscript", "separator", "copy", "cut", "paste" ], [ "undo", "redo", "space", "justifyleft", "justifycenter", "justifyright", "justifyfull", "separator", "lefttoright", "righttoleft", "separator", "orderedlist", "unorderedlist", "outdent", "indent", "separator", "forecolor", "hilitecolor", "separator", "inserthorizontalrule", "createlink", "insertimage", "inserttable", "htmlmode", "space", "removeformat", "killword" ], [ "internalLinks" ] ];
...
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
Amazon.co.uk Wishlist
Re: WYSIWYG Editor, Populating Controls
This is what I see in admin/footer.phpmatteo wrote:Hi,
please, take a look at admin/footer.php:jaytoox wrote:I cannot find where "Format Block" is populated (It contains values like: Heading 3/4/5/6, Formatted, Code, Normal, and Address). I found something similar in /admin/record.edit.php, but it isn't it.and the lines below the quoted one.Code: Select all
... config.toolbar = [ [ "fontname", "space", "fontsize", "space", "formatblock", "space", "bold", "italic", "underline", "strikethrough", "separator", "subscript", "superscript", "separator", "copy", "cut", "paste" ], [ "undo", "redo", "space", "justifyleft", "justifycenter", "justifyright", "justifyfull", "separator", "lefttoright", "righttoleft", "separator", "orderedlist", "unorderedlist", "outdent", "indent", "separator", "forecolor", "hilitecolor", "separator", "inserthorizontalrule", "createlink", "insertimage", "inserttable", "htmlmode", "space", "removeformat", "killword" ], [ "internalLinks" ] ]; ...
Code: Select all
<?php
/**
* $Id: footer.php,v 1.2.2.5 2006/01/02 12:47:10 thorstenr Exp $
*
* Footer of the admin area
*
* @author Thorsten Rinne <thorsten@phpmyfaq.de>
* @since 2003-02-26
* @copyright (c) 2001-2006 phpMyFAQ Team
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
*/
if (!defined('IS_VALID_PHPMYFAQ_ADMIN')) {
header('Location: http://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['SCRIPT_NAME']));
exit();
}
?>
</div>
<!-- Footer -->
<div>
<div id="footer">
<div><a href="http://www.phpmyfaq.de/" target="_blank">phpMyFAQ</a> <?php print $PMF_CONF["version"]; ?> | © 2001-2005 <a href="http://www.phpmyfaq.de/impressum.php" target="_blank">phpMyFAQ Team</a></div>
</div>
</div>
</body>
</html>
Code: Select all
this.toolbar = [
[ "bold", "italic", "underline", "strikethrough", "separator",
"subscript", "superscript", "separator",
"copy", "cut", "paste", "space", "undo", "redo", "space", "removeformat", "killword" ],
[ "justifyleft", "justifycenter", "justifyright", "justifyfull", "separator",
"lefttoright", "righttoleft", "separator",
"orderedlist", "unorderedlist", "outdent", "indent", "separator",
"forecolor", "hilitecolor", "separator",
"inserthorizontalrule", "createlink", "insertimage", "inserttable", "htmlmode", "separator",
"popupeditor", "separator", "showhelp", "about" ]
];
Code: Select all
this.formatblock = {
"— format —" : "",
"Heading 1": "h1",
"Heading 2": "h2",
"Heading 3": "h3",
"Heading 4": "h4",
"Heading 5": "h5",
"Heading 6": "h6",
"Normal" : "p",
"Address" : "address",
"Formatted": "pre"
};
Code: Select all
config.formatblock = {
"Heading 3": "h3",
"Heading 4": "h4",
"Heading 5": "h5",
"Heading 6": "h6",
"Normal": "p",
"Address": "address",
"Formatted": "pre",
"Code": "code"
Re: WYSIWYG Editor, Populating Controls
Hi,
admin/header.php
sorry, I was supposing you were working upon PMF 1.6.0 whilst it seems you're working upon PMF 1.5.8, so my previous reference must be changed in:jaytoox wrote:This is what I see in admin/footer.php
admin/header.php
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
Amazon.co.uk Wishlist
Hi,
please change from:
to (I've removed the "formatblock" entry) :
an you'll remove the possibility of using the Format Block.
please change from:
Code: Select all
config.toolbar = [ [ "fontsize", "space", "formatblock", "space", "bold", "italic", "underline", "strikethrough", "separator", "subscript", "superscript", "separator", "copy", "cut", "paste", "space", "undo", "redo", "space", "removeformat", "killword" ], [ "justifyleft", "justifycenter", "justifyright", "justifyfull", "separator", "lefttoright", "righttoleft", "separator", "orderedlist", "unorderedlist", "outdent", "indent", "separator", "forecolor", "hilitecolor", "separator", "inserthorizontalrule", "createlink", "insertimage", "inserttable", "htmlmode" ], [ "internalLinks" ] ];
Code: Select all
config.toolbar = [ [ "fontsize", "space", "space", "bold", "italic", "underline", "strikethrough", "separator", "subscript", "superscript", "separator", "copy", "cut", "paste", "space", "undo", "redo", "space", "removeformat", "killword" ], [ "justifyleft", "justifycenter", "justifyright", "justifyfull", "separator", "lefttoright", "righttoleft", "separator", "orderedlist", "unorderedlist", "outdent", "indent", "separator", "forecolor", "hilitecolor", "separator", "inserthorizontalrule", "createlink", "insertimage", "inserttable", "htmlmode" ], [ "internalLinks" ] ];
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
Amazon.co.uk Wishlist