Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Extends Wagtail to use the Froala WYSIWYG editor in RichTextFields/RichTextBlocks.
Extends Wagtail to use the amazing Froala editor.
This Wagtail extension requires Wagtail 1.5.x, as it uses WAGTAILADMIN_RICH_TEXT_EDITORS
.
Run the command pip install wagtailfroala
Add wagtailfroala
to your INSTALLED_APPS
.
Add wagtailfroala.rich_text.FroalaRichTextArea
to WAGTAILADMIN_RICH_TEXT_EDITORS
in your settings.
For example, to use Froala for all RichTextField
and RichTextBlock
instances:
.. code-block:: python
WAGTAILADMIN_RICH_TEXT_EDITORS = {
'default': {
'WIDGET': 'wagtailfroala.rich_text.FroalaRichTextArea',
'OPTIONS': {
'key': 'xxxxxxxxxxxx'
}
}
}
Or, to use Froala only for defined instances...
.. code-block:: python
WAGTAILADMIN_RICH_TEXT_EDITORS = {
'default': {
'WIDGET': 'wagtail.wagtailadmin.rich_text.HalloRichTextArea'
},
'froala': {
'WIDGET': 'wagtailfroala.rich_text.FroalaRichTextArea',
'OPTIONS': {
'key': 'xxxxxxxxxxxx',
'toolbarButtons': [
'paragraphFormat', 'fontFamily', 'bold', 'italic',
'underline', 'formatOL', 'formatUL', 'align',
'color', '|', 'insertHR', 'insertLink', '|', 'undo', 'redo'
]
}
},
'froala_small': {
'WIDGET': 'wagtailfroala.rich_text.FroalaRichTextArea',
'OPTIONS': {
'key': 'xxxxxxxxxxxx',
'toolbarButtons': ['fontFamily', 'bold', 'italic', 'underline', 'color', '|', 'insertLink'],
'editorClass': 'editor-small'
}
}
}
.. code-block:: python
html_field = RichTextField(editor='froala')
stream_field = StreamField([
('html', RichTextBlock(editor='froala_small'))
])
You will need to ensure that the key
option is correctly set with your Froala license key.
By default, Codemirror HTML syntax highlighting is enabled, you can disable it if you wish.
.. code-block:: python
FROALA_CODEMIRROR = False
Font Awesome is required by Froala for toolbar icons, so it is included by default. If you don't want to include it or already have a version included, you can disable it.
.. code-block:: python
FROALA_FONT_AWESOME = False
Please feel free to contribute.
FAQs
Extends Wagtail to use the Froala WYSIWYG editor in RichTextFields/RichTextBlocks.
We found that wagtailfroala demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.