I integrate the latest version of the CKEditor 4 Standard Version (v4.15 at the time of writing) via this link:
https://cdn.jsdelivr.net/npm/ckeditor4/ckeditor.js
By definition, the CKEditor 4 Standard Version does NOT include the "Justify" plugin, which is responsible for aligning text (left, right, center, justify) - at least to my understanding – according to the presets:
https://ckeditor.com/cke4/builder
And indeed, if I configure my setup with align rules, CKEditor won't recognise them:
CKEDITOR.toolbar = [
[ 'Undo', 'Redo' ],
[ 'Link', 'Unlink', 'Anchor' ],
[ 'JustifyLeft', 'JustifyCenter', 'JustifyRight' ], // <= not recognised
[ 'Bold', 'Italic', 'Underline', 'Strike' ],
[ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote' ],
'/',
[ 'SpecialChar' ],
[ 'Source', '-', 'RemoveFormat' ],
[ 'About' ]
]
However, as soon as I enable "justify" in the "extraPlugins" config option:
CKEDITOR.extraPlugins = "divarea,justify"
the align options mentioned above ARE recognised and work perfectly fine (even though, as already mentioned, the CKEDITOR 4 Standard Version Preset does not implement that very plugin).
I know that there is a "stylecombo" plugin, but that one is activated by default and seems not to be able to recognise the align features by itself.
In my opinion, the "justify" plugin should not work, throw an error and ignore any alignment configurations. But that's not the case...
On the other hand, when I try to include "Superscript" and "Subscript"
[ 'Bold', 'Italic', 'Underline', 'Strike', 'Superscript', 'Subscript' ],
which should be supported by the "basicstyles" plugin, they are NOT recognised. Here I was assuming that these button would be displayed in the editor.
Can anybody help me find out, what I am misunderstanding here, please?
Thank you!
JSDeliver provides NPM packages directly, so in this case you basically get NPM ckeditor4 package. And here, you are almost right on the standard preset, however in case of NPM ckeditor4 package it provides standard-all preset. And the difference is as README describes:
The CKEditor 4 npm package comes in the standard-all preset, so it includes all official CKEditor plugins, with those from the standard package active by default.
So this means Justify plugin is included in the package but not active by default. And to activate it you just need to use extraPlugins configuration option as you mentioned.
This is mostly done for convenience so activating more plugins is as simple as changing editor configuration without a need to add additional packages.
Related
I have been recently trying to use the MinGW gcc compiler with Code, and am getting some issues with Intellisense(not breaking, but I find it annoying).
I followed the documentation to edit the path for the c_cpp_properties.json file, but the error continues to pop up and I think I have also found contradictory information.
{
"name": "Win32",
"includePath": [
"${workspaceRoot}"
],
"defines": [
"_DEBUG",
"UNICODE"
],
"intelliSenseMode": "msvc-x64",
"browse": {
"path": [
"${workspaceRoot}",
"C:\\MinGW\\lib\\gcc\\mingw32\\6.3.0\\include\\c++"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
}
}
],
"version": 3
I looked on the github repo for the documentation and found someone had committed a change where ${workspaceRoot} was changed to workspaceFolder in the documentation. However, root seems to be the default for VS code, and I only updated to the new orange logo version this morning.
https://github.com/Microsoft/vscode-docs/commit/fa613d436a53bd9c5a21065cf5fa0f1b350d9bc6
So which is the correct way to get Intellisense working, Folder or Root?
Turning #Marks comment into an answer: ${workspaceRoot} is deprecated, ${workspaceFolder} should be used instead: https://code.visualstudio.com/docs/editor/multi-root-workspaces
See also this description of variables: https://code.visualstudio.com/docs/editor/variables-reference
${workspaceFolder} - the path of the folder opened in VS Code
According to this answer, this functionality should be built into Atom, and I should be able to use customFileTypes to accomplish this. This is what my config looks like:
"*":
"exception-reporting":
userId: ""
welcome:
showOnStartup: false
core:
themes: [
"atom-light-ui"
"atom-light-syntax"
]
customFileTypes:
"source.twig": [
"html"
]
editor:
invisibles: {}
tabLength: 4
showIndentGuide: true
showInvisibles: true
Note that I've removed my userId value for security, but I do have it in my actual config.
Oddly enough, if I switch the order of customFileTypes with themes, my theme breaks. Why is that?
More importantly, how can I set all .twig files use HTML (or HTML Mustache?) syntax highlighting?
I was looking for the same thing, to enable the php-twig package to also work for html filetypes while also allowing the html syntax to be rendered. I changed your source.twig to text.html.twig which seems to be working:
"*":
core:
customFileTypes:
"text.html.twig": [
"html"
]
I only got Twig support after installing this package: https://atom.io/packages/php-twig
I'm using yeoman's angular-fullstack generator with default parameters.
I would like to use ckeditor with https://github.com/lemonde/angular-ckeditor , so I extended my bower.json with the following lines:
"ckeditor": "#full/4.4.7",
"angular-ckeditor": "~0.4.2"
It works well in development mode ( grunt serve ), but it fails in production ( grunt serve:dist ). It tries to load /config.js and /skins/moono/editor_gecko.css and the language file dynamically, but it fails.
Have anybody idea how to solve it?
Had similar issue with ACE editor. What I did is I added override in bower.json
for ace looks like this
"overrides": {
"ace-builds": {
"main": [
"src-noconflict/ace.js",
"src-noconflict/theme-monokai.js",
"src-noconflict/worker-javascript.js",
"src-noconflict/mode-javascript.js"
]
},
for you ckeditor config you can specify it in a similar way in the overrides
i.e.
"overrides": {
"ckeditor": {
"main": [
"path/to/your/ckeditor.js",
"path/to/your/ckeditor/config.js"
]
}
}
for the CSS, not sure but if you check your gruntfile you might come up with a simple solution (i.e. add one more folder to the CSS sources).
If you find a nice CSS solution please post it as it could be helpful to more people ;)
I want to use sass/scss in a new project, but it somehow doesn't work.
I am using the yii2-asset-converter and when I try to convert the scss-file, the following error is thrown:
Class #app/extensions/assetparser/vendors/phamlp/sass/SassParser does not exist
I am checking the path ../phamlp/ and notice, that the Folder sass resp. SassParser.php doesn't exist.
The SassParser.php is located in the extension vendor/richthegeek/phpsass, which is required by yii2-asset-converter.
I have tried out some paths like:
# vendor/richthegeek/phpsass or
__DIR__/../../vendor/richthegeek/phpsass
But it doesn't worked .After a lot of unsuccessful attempts I hope some of you know how to solve the problem.
PS:I use the advanced app template
Don't use PhalmP or phpsass. These are outdated. You'll never get satisfactory results with them, especially when using modern Sass libraries.
Use original Sass as a standalone.
Simply install Ruby (you might already have it) and Sass and use the sass command line tool to compile.
Also, using Compass might make your life easier. Compass helps organizing your Sass code and also provides a Sass library with a lot of useful helpers.
You can use this plugin.
But you must combine your sass code in single file.
Here's example of config/web.php
'assetManager'=>[
'converter'=>[
'class'=> 'nizsheanez\assetConverter\Converter',
'force'=> true, // true : If you want convert your sass each time without time dependency
'destinationDir' => '', //at which folder of #webroot put compiled files
'parsers' => [
'scss' => [ // file extension to parse
'class' => 'nizsheanez\assetConverter\Scss',
'output' => 'css', // parsed output file type
'options' => [ // optional options
'enableCompass' => true, // default is true
'importPaths' => ['/sass','/sass/_offers'], // import paths, you may use path alias here,
// e.g., `['#path/to/dir', '#path/to/dir1', ...]`
'lineComments' => true, // if true — compiler will place line numbers in your compiled output
'outputStyle' => 'expanded', // May be `compressed`, `crunched`, `expanded` or `nested`,
// see more at http://sass-lang.com/documentation/file.SASS_REFERENCE.html#output_style
],
],
]
]
]
Hullo,
I would like to test my app for the turn-by-turn configuration and so I wanted to load my GEOJson file to Xcode. Yet when I open the Routing App Coverage File pulldown and try to select my polygon it appears greyed, like all other documents in my filesystem, for that matter. Should it have some specific form or ending, or what else?
Have you tried accessing the file with another xcode project? I've had issues with XCode project files in the past and have had to re-create the project or completely remove all my resources and add them back in to update the directory references.
I wasn't able to get XCode to find the file either .. but I renamed the file to GeoJSON without any file extension and then ran my app through the Simulator without first associating it to my Scheme as described by the Apple docs. And that worked.
For reference my GeoJSON file contained Denmark e.g.
{
"type": "MultiPolygon",
"coordinates": [
[
[
[
6.592041015625,
58.029833609102994
],
[
13.952880859375,
57.924973963067735
],
[
13.886962890625,
52.89389531877394
],
[
5.910888671875,
53.21087169635909
],
[
6.592041015625,
58.029833609102994
],
[
6.592041015625,
58.029833609102994
],
[
6.592041015625,
58.029833609102994
]
]
]
]
}
I solved the issue by appending the right file ending by trying to upload the file on iTunes connect and receiving a tale-telling error.