I have a bolt cms website. On the entries/ showcase pages I would like to replace the default editor with the CK editor.Right now the editor has only the basic buttons that is 6 -7 buttons.It looks something like this :
Whereas I want this kind of an editor:
How do I go about this?
In your app/config/config.yml file you have the following section:
wysiwyg:
images: false # Allow users to insert images in the content.
anchor: false # Adds a button to create internal anchors to link to.
tables: false # Adds a button to insert and modify tables in the content.
fontcolor: false # Allow users to mess around with font coloring.
align: false # Adds buttons for 'align left', 'align right', etc.
subsuper: false # Adds buttons for subscript and superscript, using `<sub>` and `<sup>`.
embed: false # Allows the user to insert embedded video's from Youtube, Vimeo, etc.
underline: false # Adds a button to underline text, using the `<u>`-tag.
ruler: false # Adds a button to add a horizontal ruler, using the `<hr>`-tag.
strike: false # Adds a button to add stikethrough, using the `<s>`-tag.
blockquote: false # Allows the user to insert code snippets using `<pre><code>`-tags.
codesnippet: false # Allows the user to insert blockquotes using the `<blockquote>`-tag.
specialchar: false # Adds a button to insert special chars like '€' or '™'.
Setting these to true will give you the relevant buttons.
As for extra buttons via plugins, we'll be adding that ability natively with CKEditor 5.
Related
I am trying to modify the PS 1.7 admin theme - simply to hide a few options and menu items.
I modified ./adminFolder/themes/default/css/override.css
And it works everywhere, except at Catalog/Products and Modules - as if there were no overrides.
How can I get the css overrides to work globally in the admin area?
If you want to hide menu/sub-menus, you can set the visibility from within the database in the table [PREFIX]_tab (default is ps_tab).
The top menu has 0 for id_parent and submenus has a value superior to 0.
By example, I have this vehicle file custom module:
If I set the row with the class_name "V2vVehicleFile" to active = 0 (false), then the whole menu (including its submenus) disappear.
Now, if I set the row with the class_name "AdminVehicleMake" to active = 0 (false), then only the submenus named "Vehicle make" disappear.
The product controller is already in the new system (symfony).
Looking at the source code you can see that it uses 5 css:
/modules/welcome/public/module.css
/admin/themes/new-theme/public/theme.css
/js/jquery/plugins/chosen/jquery.chosen.css
/admin/themes/default/css/vendor/nv.d3.css
/admin/themes/default/css/bundle/right-sidebar.css
The overrides.css is only for the "old theme". And I don't know of any for the new one.
So either you change one of these, and run the risk of being overwritten on upgrade. Or override the AdminController->setMedia($isNewTheme = false) to add your custom css. Or use the Hook::exec('actionAdminControllerSetMedia'); in a module to add it.
Add the overrides.css file location to the function named setMedia in classes/controller/AdminController.php
public function setMedia($isNewTheme = false)
{
if ($isNewTheme) {
$this->addCSS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/default/css/overrides.css', 'all', 1);
There seams to be an issue with tabview and text editor integration. The editor displays and works fine as long as the user does not switch tabs. When the user switches tab and comes back to the tab where the text editor is integrated, the contents of the editor disappears and becomes irresponsive (can't type text in it).
I have tested this with the following editors with different results:
ckeditor - value is reset, component becomes irresponsive
tinymce - value is reset, component becomes irresponsive
mercury - value is reset but component works (you can type text anew).
nicedit - Works!
Here is sample code definition.
webix.ui({
container: 'richtext-div',
view: "tabview",
cells:[{
header: 'Tab 1',
view: 'form',
elements: [{
view: 'ckeditor',
width: 800,
height: 500,
value: 'This is a test value for the rich text component'
}]
},{
header: 'Tab 2',
rows: [{
template: 'This is the second tab'
}]
}]
});
Anyone has resolved this issue before, please advise. Tnx.
Lefteris
You can the keepView property
http://docs.webix.com/api__ui.multiview_keepviews_config.html
It changes the logic of multiview, to preserve iframe based views ( such as ckeditor and others )
view: "tabview",
multiview:{ keepViews:true },
cells:[{
Here is a spippet http://webix.com/snippet/8b9f24ea
Do you know how Webix handles the switching of tabs?
I suspect that when the tabs are switched that its accidentally destroying the TinyMCE underlying DOM element and making a new one when you return?
If you are leaving the "tab" with TinyMCE you likely need to remove() TinyMCE before leaving the tab. When you return to the tab you need to init() the editor again. This is a common problem with web UIs that show/hide or destroy DOM elements while the editor is open.
Is it possible to use the stylesheet parser in full page mode? I can get either of these features to work, but not both. For example, the following settings result in an empty styles combo box.
var editor1 = CKEDITOR.replace('editor1', {
contentsCss: ['myStyles.css'],
stylesSet: [],
fullPage: true,
allowedContent: true
});
If I comment out the "styleSet: []" line, then the combo box gets populated with the default styles, and mine don't get added. On the other hand, if I comment out "fullPage: true", then my styles get added, but I'm not in full page mode.
I'm using the latest version of ckeditor (4.4.7). Thanks for any help ...
I've read many posts regarding the lack of documentation for button lists in CKEditor 4, and I've found posts where individuals even posted a list of button Items based on their testing.
However, what my client has asked is to remove specific buttons within the Source group - the Comment, Uncomment and HTML Tag Autocomplete buttons.
Does anyone know the correct button names for these buttons that will work with removeButtons()?
I've tested the obvious - Comment,Uncomment,Autocomplete - but they have no effect.
Thanks.
I know it is late for the OP, but for anyone interested, the default configuration for the CodeMirror plug-in toolbar is (Sourcedialog included):
{ name: 'document', items: [ 'Source', 'Sourcedialog', 'autoFormat', 'CommentSelectedRange', 'UncommentSelectedRange', 'AutoComplete' ] }
To remove specific buttons with the removeButtons() function you can add each button name to the array, so for the case in question:
removeButtons: 'CommentSelectedRange,UncommentSelectedRange,AutoComplete'
Notice the names of the buttons are case-sensitive.
For whomever stumbles upon this later on.
The buttons are added by the codemirror plugin. Codemirror has configuration to not include these buttons.
CKEDITOR.config.codemirror = {
// Whether or not to show the search Code button on the toolbar
showSearchButton: false,
// Whether or not to show Trailing Spaces
showTrailingSpace: true,
// Whether or not to show the format button on the toolbar
showFormatButton: false,
// Whether or not to show the comment button on the toolbar
showCommentButton: false,
// Whether or not to show the uncomment button on the toolbar
showUncommentButton: false,
// Whether or not to show the showAutoCompleteButton button on the toolbar
showAutoCompleteButton: false
};
I have found a comment by zbacsi on jqgrids site under inline editing.
http://www.trirand.com/jqgridwiki/doku.php?id=wiki:inline_editing#how_is_the_data_organized
"zbacsi, 2010/08/02 20:23
There is an escaping bug with special characters. Try insert alert('hello') into a field. It should be displayed as common text, but its executed..."
I was able to reproduce this issue, on my own grid setup, using the below versions of jqGrid and jQuery.
jqGrid version - > 4.4.4, jQuery version - > 1.7.1.
This can also be reproduced on the inline editing demo pages for jqGrid, located at:
http://www.trirand.com/blog/jqgrid/jqgrid.html
Once there navigate to:
Functionality -> Formatter Actions and begin editing a row.
Inside of the column labeled 'Notes' insert the value: <script>alert('hi')</script>
Hit enter or click the 'Save' icon.
The alert('hi') gets executed rather than 'Notes' containing <script>alert('hi')</script>
Any additional information would be much appreciated, thank you.
It's not a bug. You can fix the problem by usage option
autoencode: true
which I personally strictly recommend you to use the option in all grids.
jqGrid have many options. I personally find default values of some options (see values in "Default" column on the page documentation) not optimal. One from such options is autoencode which default value is false. It means that all data used to fill the grid cells will be interpreted as HTML code fragments. Scripts are the only problem which one have, but inserting the text like a>b, </tr> or <-- could really break the page.
jqGrid allow to overwrite the default by extending $.jgrid.defaults. So I include on every HTML page JS file with my own default preferences. In the file there are lines like
$.extend($.jgrid.defaults, {
autoencode: true,
gridview: true,
height: "auto"
datatype: "json",
loadui: 'block',
...
});