Howdy. I'm an end user trying to get some clues about a change to the way the CKeditor is behaving in our system...
We have always had WYSIWYG Format and Styles menus in our CKeditor-based editor. When we selected Heading 3, for example, it used to simply wrap whatever we had selected with:
<h3>selected content</h3>
But now it doing something like this:
<h3 style="font-family:georgia,times new roman,times,serif;font-size:36px;color:#333333;padding:0px;font-weight:normal;margin-top:0px;margin-right:0px;margin-bottom:8px;margin-left:0px;">selected content</h3>
So we always have to manually delete all the inline styles. This has been happening for a number of months now and we are trying to figure out what could have changed...
I do know that we updated to a newer version of CKeditor... is this just how the newer versions work? Or is there some sort of toggle? I'm just trying to gather whatever details/notes I can for our developer in hopes that this can be fixed where we retain our WYSIWYG menus but have it only wrap selected content with plain heading tags...
Many thanks!
We have always had WYSIWYG Format and Styles menus in our CKeditor-based editor. When we selected Heading 3, for example, it used to simply wrap whatever we had selected with:
<h3>selected content</h3>
But now it doing something like this:
<h3 style="font-family:georgia,times new roman,times,serif;font-size:36px;color:#333333;padding:0px;font-weight:normal;margin-top:0px;margin-right:0px;margin-bottom:8px;margin-left:0px;">selected content</h3>
So we always have to manually delete all the inline styles. This has been happening for a number of months now and we are trying to figure out what could have changed...
I do know that we updated to a newer version of CKeditor... is this just how the newer versions work? Or is there some sort of toggle? I'm just trying to gather whatever details/notes I can for our developer in hopes that this can be fixed where we retain our WYSIWYG menus but have it only wrap selected content with plain heading tags...
Many thanks!
Re: Format menu now inserting inline styles?
Re: Format menu now inserting inline styles?
Re: Format menu now inserting inline styles?
Then I guess that it must be some configuration that you have done. the online demo doesn't work that way http://ckeditor.com/demo
Re: Format menu now inserting inline styles?
Actually, the demo is kinda doing the same thing...
My guess is that the Heading styles don't have any style definitions applied to them so in those cases it is just wrapping them with <h1>, <h2>, etc...
But if you apply a style from the style menu you get this:
<span style="background-color:lime;">selected text</span>
Rather than getting something like:
<span class="MarkerGreen">selected text</span>
So I believe that if the Headings had some custom styles applied to them (like if h2 was red) you'd see inline styles there, too, when applied to text.
We are also thinking something had to have changed on our end -- I believe we updated our version of ckeditor earlier this year so that's when it must have happened...
Re: Format menu now inserting inline styles?
Although I think that the default styles used in the sample isn't using a class in any of them, you can configure it that way instead of using inline styles.