On uploading an image and setting the alignment to float:right; when it displays in browser the style tag is removed.
This seems to be a very common issue, but I must have read every thread on stackoverflow as well as many on lesser forums and the general consensus is that its down to the Advanced Content Filter and if I add config.allowedContent=true; to ckeditor.config.js or to custom javascript configuration textbox my problem will be solved. I have tried that and it did not solve my issue (I also cleared the cache each time I applied a change).
I have also added <style> to Home » Administration » Configuration » Content authoring » Text formats but this has had no effect.
After reading the documentation and rereading the documentation I have drawn a blank and hope someone could offer a solution, in the form of a plugin or a line/block of code.
Related
I'm working on a couple of features for a project that I created a few months back when I was first learning React. I wanted to add a wysiwyg editor to one of my forms so that a user could have more control with the "about" section of an event page (i.e. embed media and images, html source code editing, font formatting, etc.)
The editor that I'm using is TinyMCE 5.0.
This project is a Rails backend and React frontend. (I'm not using Redux - this project was a way to practice React when I first learning it.)
You can find my last commit here if you would like to see my code
The Problem
I'm able to get the wysiwyg editor rendered. I can also type and format text inside the editor's body. When I click on the code icon or image embed icon (like in the gif below), a new modal appears but when I click into it to type, the text cursor appears and then disappears. So I can't type and it seems that the text area and fields become inactive (for lack of a better term - I'm still somewhat in the beginning of my coding journey.)
I just signed up and TinyMCE gives access to premium plugins as well, so I don't think it's an issue with my account permissions/subscription.
I'm also not receiving anything in the console but if there's any help you can provide, it would be appreciated!
Thanks!
TinyMCE 5 editor - text cursor issue - text areas become inactice
It is highly likely that the library you are using for your modal (that contains TinyMCE) is not allowing focus to go elsewhere. As you have not stated the library you use for your modal I can't tell you anything about how to address this but we know this is an issue with common libraries like Bootstrap:
https://www.tiny.cloud/docs/integrations/bootstrap/#usingtinymceinabootstrapdialog
Whatever you are using should have a similar ability.
I followed draft-js document to create a very simple demo of draft-js.
Everything seems work well, but when I open the url in Chrome, I can only see a white blank page (there is a hidden editor component there but is not visible)
There is no error on the console of the browser.
The demo project is here: https://github.com/js-demos/react-draft-js-demo, you can clone it and follow the readme to run it.
I have reviewed the code very carefully, but can't figure out why.
If you just use the sample code on the official website of Draft.js, you will see nothing on the page. It's just a blank text input field. If you click that field, you could type something. Draft.js is not a out of the box plugin, but a "a framework for building rich text editors in React".
Hope you figured it out, if not (or for anyone else), the solution for me was two step:
Download the Draft.css file and include it in your source code.
Reference said file in your index.html as such:
<link rel="stylesheet" href="./src/components/Draft.css" />
In other words, your problem was to do with the styling of the Draft-js Editor, since for you the editor was 'hidden' i.e. without any discernible box around it etc.
Actually, I tried a lot to solve this problem but in vain. What I did is using another package that is built on the top of draft js, and It's working fine.
you can find it here:https://jpuri.github.io/react-draft-wysiwyg/#/
I'm no genius, but might I recommend this:
https://www.youtube.com/watch?v=XGxdCXyMC7k
In short, it looks like the default is just a Rich Text Editor enabler type thing. You want more of a single instance, like their demo in the 'Rich Styling' section of the docs.
Because of some reasons I am not able to change the view of teaser of my content type using drupal's UI, so I have to immediately force drupal to show images of contents of one of my specific content types in teaser. So, Is there anyway to do it by editing a table of it's database or someone could give me a better idea?
Thanks in advance \M/
You can override the node's template files in the site's theme. A full description of Drupal theme overrides is a large topic, and is version specific but hopefully this is enough to get you started down the right path.
Drupal provides a series of naming suggestions for various templates you can use to override default behaviors (and your own code as well). In Drupal 7 would should be looking for node--[content-type-name]--teaser.tpl.php or node--[content-type-name].tpl.php and then add conditional for the various display modes.
See also: the Drupal community documentation on node.tpl.php
I'm putting together a WPF application that will allow users to view PowerPoint files through the WebBrowser control, once the files have been saved as either .MHT or .HTML. The problem is that the files contain ActiveX controls, and the WebBrowser control by default will display a warning every time I load these files, saying "To help protect your security, your web browser has restricted this file from showing active content that could access your computer."
I've seen a few different places online talk about putting the mark of the web into each page, but that really doesn't work for me in this case, since the content authors have control over the files, not the developers, and I'd rather not tell them that they have to open every single file in Notepad and add the mark of the web to each one.
Is there any way to just change the WebBrowser control's settings to not display that warning message? IE has a similar setting, but it doesn't carry over into this control.
We eventually found a decent solution to this, although I still wish there were some sort of settings on the control itself. To load the documents, we just set browser.Source to be the following:
file://127.0.0.1/c$/path/to/the/file (where the path is an absolute path without C:\, for example, c$/Users/jschuster/mydocument.html)
For whatever reason, the control will display files referenced by a URL in that format without a warning.
Hope this might help someone even that the question is a bit old ...
As per the link to "The Mark Of The Web" , adding comment like
<!-- saved from url=(0016)http://localhost -->
just under the HTML tag worked.
My index.html is in HTML folder, added as "content" set to "Always copy" in WPF project using WebBrowser control.
The address to the file during execution look like this:
file:///E:/SRC_2013/WebBrowserTestApp/WebBrowserTestApp/bin/Debug/HTML/index.html
Why not insert the MOTW dynamically at the beginning of the file when you load it ?
By the way, thanks for your question : I didn't know about the "mark of the web" and it solved a problem I had :)
file://127.0.0.1/c$/path/to/the/file (where the path is an absolute path without C:\, for example, c$/Users/jschuster/mydocument.html)
This worked for me as well on Win7.
I got a problem when I put 2 instances of FckEditor to a page in dotnetnuke.
sometimes, I got empty text when I call the text property.
Anyone helps?
The empty Text property is usually caused by having the editor in an update panel (either explicitly or by turning on partial rendering for that control definition).
For those using the FCKEditor on their
dotnetnuke sites, I recommend updating
to the latest version, it fixes a
number of problems including multiple
instances on the same page. (something
you will need for the latest news
articles).
Source
Download the latest version of the FCKeditor provider.