Renamed node_api and node_storage by blog_api and blog_storage in related CMS_BLOG_* classes. Mainly to avoid confusion with NODE_ classes.
Merged CMS_BLOG_CONFIG with CMS_BLOG_API. In CMS_BLOG_API, prefer argument of type CMS_USER, rather than using directly user id. Added a CMS_EDITOR_CONTENT_FORMAT for now, to be the format editable by the WYSIWYG editor. Added CMS_MODULE.is_initialized: BOOLEAN to equip router, and module_api with expected preconditions. Fixed typo, especially in log output. Corrected a few routine names such as add_authors that should not be a function according to its name. Converted various function returning html content, to procedure appending html content to an output string to minimize temporary string object creation. Cosmetic: added spaces to make code easier to read, and indentation.
This commit is contained in:
31
src/kernel/content/format/cms_editor_content_format.e
Normal file
31
src/kernel/content/format/cms_editor_content_format.e
Normal file
@@ -0,0 +1,31 @@
|
||||
note
|
||||
description: "HTML Content format editable with WYSIWYG editor."
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
CMS_EDITOR_CONTENT_FORMAT
|
||||
|
||||
inherit
|
||||
CONTENT_FORMAT
|
||||
redefine
|
||||
default_create
|
||||
end
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
default_create
|
||||
do
|
||||
Precursor
|
||||
create filters.make (0)
|
||||
end
|
||||
|
||||
feature -- Access
|
||||
|
||||
name: STRING = "cms_editor"
|
||||
|
||||
title: STRING_8 = "CMS HTML content"
|
||||
|
||||
filters: ARRAYED_LIST [CONTENT_FILTER]
|
||||
|
||||
end
|
||||
@@ -27,10 +27,11 @@ feature -- Access
|
||||
once
|
||||
-- Can we provide an external file to read the
|
||||
-- supported formats?
|
||||
create {ARRAYED_LIST [CONTENT_FORMAT]} Result.make (3)
|
||||
create {ARRAYED_LIST [CONTENT_FORMAT]} Result.make (4)
|
||||
Result.force (plain_text)
|
||||
Result.force (full_html)
|
||||
Result.force (filtered_html)
|
||||
Result.force (cms_html)
|
||||
end
|
||||
|
||||
default_format: CONTENT_FORMAT
|
||||
@@ -43,6 +44,11 @@ feature -- Access
|
||||
create Result
|
||||
end
|
||||
|
||||
cms_html: CMS_EDITOR_CONTENT_FORMAT
|
||||
once
|
||||
create Result
|
||||
end
|
||||
|
||||
full_html: FULL_HTML_CONTENT_FORMAT
|
||||
once
|
||||
create Result
|
||||
@@ -53,7 +59,6 @@ feature -- Access
|
||||
create Result
|
||||
end
|
||||
|
||||
|
||||
note
|
||||
copyright: "2011-2014, Jocelyn Fiat, Eiffel Software and others"
|
||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||
|
||||
Reference in New Issue
Block a user