Picture of Jonathan Briggs
Span class limitations in text editor
by Jonathan Briggs - Friday, 9 October 2020, 3:28 PM

Hello all,

I've got a project on the go that involves lots of text and so it needs breaking up in-line with various levels of subheads. I'm trying to do this nicely with span classes, and hence I've got one going on to create a dropcap and then a few levels of subheads. It was all progressing fine until out of nowhere in the body of a text component when I added a second span class in the source code and returned to the editor and saved, everything from that second span class and beyond disappeared…

Is there a limitation with this that perhaps I'm not aware of? I'm using AAT 0.10.4; FW 5.7.0

The only work around I've come up with is to copy an already existing bunch of source code that includes the required classes, and then replace the running text, but that's not really very nice at all.

As I say, it worked alright for a while… then didn't.

Thoughts anyone?



Picture of Marissa Preciado
Re: Span class limitations in text editor
by Marissa Preciado - Tuesday, 27 October 2020, 9:41 PM

Try going into the config.json file and after "ckEditorExtraAllowedContent" add "span(*)[*]{*}". 

You will need to do a rebuild. This should keep the editor from stripping out the span tag.

Picture of Jonathan Briggs
Re: Span class limitations in text editor
by Jonathan Briggs - Wednesday, 28 October 2020, 10:55 AM

Thanks very much for that! I recall it being discussed quite a while ago on a previous framework and I could never get it to work, but I figure things have changed. Very useful!