Firstly I would like to thank you for this amazing tools. It really satisfies most of my needs, but currently I am struggling with adding new tool, correctly with adding certain tags.
Scenario:
Adding new tool as simple as it can.
class ContentTools.Tools.Test extends ContentTools.Tools.Heading
# Convert the current text block to a subheading (e.g <q>foo</q>)
ContentTools.ToolShelf.stow(@, 'quote')
@label = 'Quote'
@icon = 'quote'
@tagName = 'q'
It all works fine, extending Heading, overriding apply and adding custom css class. When in edit mode i can substitute my q tag with h1 or any predefined tag, as well as reverse. This go bad when i save article (it still have styling), go back in edit mode and my text can't be edited. It got class ce-element--type-static and i guess that is the problem since ti can't get focus. I am assuming that I need to register my new tag somewhere but I have problems with that. If you could help me or provide some info I would be grateful. Code snippet below works fine.
class ContentTools.Tools.Test extends ContentTools.Tools.Heading
# Convert the current text block to a subheading (e.g <q>foo</q>)
ContentTools.ToolShelf.stow(@, 'quote')
@label = 'Quote'
@icon = 'quote'
@tagName = 'blockquote'
And one additional question, is it posible to include new font on new element style?
Hello,
Firstly I would like to thank you for this amazing tools. It really satisfies most of my needs, but currently I am struggling with adding new tool, correctly with adding certain tags.
Scenario: Adding new tool as simple as it can.
It all works fine, extending Heading, overriding apply and adding custom css class. When in edit mode i can substitute my q tag with h1 or any predefined tag, as well as reverse. This go bad when i save article (it still have styling), go back in edit mode and my text can't be edited. It got class ce-element--type-static and i guess that is the problem since ti can't get focus. I am assuming that I need to register my new tag somewhere but I have problems with that. If you could help me or provide some info I would be grateful. Code snippet below works fine.
And one additional question, is it posible to include new font on new element style?
Thank you